@hedia/types 2.1.31-alpha.4 → 2.1.31-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/post-merge.yml +60 -0
- package/.github/workflows/publish-alpha.yaml +17 -4
- package/alpha-release.sh +0 -0
- package/package.json +3 -2
- package/.github/workflows/publish.yml +0 -37
- package/.github/workflows/version-check.yml +0 -37
- package/dist/types/services/outbound/notification.d.ts +0 -12
- package/dist/types/services/outbound/notification.js +0 -3
- package/dist/types/services/outbound/notification.js.map +0 -1
- package/types/services/outbound/notification.ts +0 -13
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Post-merge - Publish & Update package version
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
types: [closed]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
|
|
11
|
+
NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
publish-package-push-master:
|
|
15
|
+
if: github.event.pull_request.merged == true
|
|
16
|
+
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
strategy:
|
|
20
|
+
matrix:
|
|
21
|
+
node-version: [14.15]
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v2
|
|
25
|
+
|
|
26
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
27
|
+
uses: actions/setup-node@v2
|
|
28
|
+
with:
|
|
29
|
+
node-version: ${{ matrix.node-version }}
|
|
30
|
+
|
|
31
|
+
- name: Register ssh keys
|
|
32
|
+
uses: webfactory/ssh-agent@v0.5.3
|
|
33
|
+
with:
|
|
34
|
+
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
|
|
35
|
+
|
|
36
|
+
- name: Register NPM access token
|
|
37
|
+
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
|
38
|
+
|
|
39
|
+
- name: Removing alpha tag from package json
|
|
40
|
+
run: chmod +x ./pre-release.sh && ./pre-release.sh
|
|
41
|
+
|
|
42
|
+
- name: Installing dependencies
|
|
43
|
+
run: npm ci
|
|
44
|
+
|
|
45
|
+
- id: publish
|
|
46
|
+
uses: JS-DevTools/npm-publish@v1
|
|
47
|
+
with:
|
|
48
|
+
token: ${{ env.NPM_TOKEN }}
|
|
49
|
+
|
|
50
|
+
- if: steps.publish.outputs.type == 'none'
|
|
51
|
+
run: |
|
|
52
|
+
echo "Failed to publish on npm, version already exists"
|
|
53
|
+
exit 1
|
|
54
|
+
|
|
55
|
+
- name: Commit & Push changes
|
|
56
|
+
uses: actions-js/push@master
|
|
57
|
+
with:
|
|
58
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
59
|
+
branch: 'master'
|
|
60
|
+
message: 'Post-publish master package version update'
|
|
@@ -14,28 +14,41 @@ jobs:
|
|
|
14
14
|
- uses: actions/checkout@v2
|
|
15
15
|
- uses: actions/setup-node@v2
|
|
16
16
|
with:
|
|
17
|
-
node-version:
|
|
17
|
+
node-version: ${{ matrix.node-version }}
|
|
18
|
+
|
|
19
|
+
- name: Register ssh keys
|
|
20
|
+
uses: webfactory/ssh-agent@v0.5.3
|
|
21
|
+
with:
|
|
22
|
+
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
|
|
23
|
+
|
|
24
|
+
- name: Register NPM access token
|
|
25
|
+
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
|
26
|
+
|
|
27
|
+
- name: Installing dependencies
|
|
28
|
+
run: npm ci
|
|
29
|
+
|
|
18
30
|
- id: publish-alpha
|
|
19
31
|
uses: JS-DevTools/npm-publish@v1
|
|
20
32
|
with:
|
|
21
33
|
token: ${{ env.NPM_TOKEN }}
|
|
22
34
|
tag: alpha
|
|
35
|
+
|
|
23
36
|
- if: steps.publish-alpha.outputs.type == 'none'
|
|
24
37
|
run: |
|
|
25
38
|
echo "Package JSON version is already published, please bump the version!"
|
|
26
39
|
exit 1
|
|
27
|
-
|
|
40
|
+
|
|
28
41
|
- if: steps.publish-alpha.outputs.type != 'none'
|
|
29
42
|
uses: izhangzhihao/delete-comment@master
|
|
30
43
|
with:
|
|
31
44
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
32
45
|
delete_user_name: github-actions[bot]
|
|
33
46
|
issue_number: ${{ github.event.number }} # remove comments from the current PR
|
|
47
|
+
|
|
34
48
|
- if: steps.publish-alpha.outputs.type != 'none'
|
|
35
49
|
uses: peter-evans/create-or-update-comment@v1
|
|
36
50
|
with:
|
|
37
51
|
issue-number: ${{ github.event.pull_request.number }}
|
|
38
52
|
body: |
|
|
39
53
|
🎉Successfully released alpha version🎉
|
|
40
|
-
✅${{ steps.publish-alpha.outputs.version }}
|
|
41
|
-
|
|
54
|
+
✅${{ steps.publish-alpha.outputs.version }}
|
package/alpha-release.sh
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hedia/types",
|
|
3
|
-
"version": "2.1.31-alpha.
|
|
3
|
+
"version": "2.1.31-alpha.7",
|
|
4
4
|
"description": "Enums, interfaces, and other common types for use in Hedia's software.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"tsc": "tsc --build",
|
|
12
12
|
"clean": "tsc --build --clean",
|
|
13
13
|
"prepublish": "npm ci --ignore-scripts && npm run tsc",
|
|
14
|
-
"postpublish": "npm run clean"
|
|
14
|
+
"postpublish": "npm run clean",
|
|
15
|
+
"bump-alpha": "chmod +x ./alpha-release.sh && ./alpha-release.sh"
|
|
15
16
|
},
|
|
16
17
|
"keywords": [],
|
|
17
18
|
"author": "Hedia",
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: NPM Publish Bot
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
- master
|
|
8
|
-
|
|
9
|
-
env:
|
|
10
|
-
SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
|
|
11
|
-
NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
publish-npm-package:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v2
|
|
18
|
-
- uses: actions/setup-node@v2
|
|
19
|
-
with:
|
|
20
|
-
node-version: '14'
|
|
21
|
-
- name: Register ssh keys
|
|
22
|
-
uses: webfactory/ssh-agent@v0.5.3
|
|
23
|
-
with:
|
|
24
|
-
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
|
|
25
|
-
- name: Register NPM access token
|
|
26
|
-
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
|
27
|
-
- name: Removing alpha tag from package json
|
|
28
|
-
run: chmod +x ./pre-release.sh && ./pre-release.sh
|
|
29
|
-
- id: publish
|
|
30
|
-
uses: JS-DevTools/npm-publish@v1
|
|
31
|
-
with:
|
|
32
|
-
token: ${{ env.NPM_TOKEN }}
|
|
33
|
-
|
|
34
|
-
- if: steps.publish.outputs.type == 'none'
|
|
35
|
-
run: |
|
|
36
|
-
echo "Failed to publish on npm, version already exists"
|
|
37
|
-
exit 1
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: Version Check
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
|
|
5
|
-
env:
|
|
6
|
-
SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
|
|
7
|
-
NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
version-check:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v2
|
|
14
|
-
- uses: actions/setup-node@v2
|
|
15
|
-
with:
|
|
16
|
-
node-version: '14'
|
|
17
|
-
- name: Register ssh keys
|
|
18
|
-
uses: webfactory/ssh-agent@v0.5.3
|
|
19
|
-
with:
|
|
20
|
-
ssh-private-key: |
|
|
21
|
-
${{ env.SSH_PRIVATE_KEY }}
|
|
22
|
-
- name: Register NPM access token
|
|
23
|
-
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
|
24
|
-
env:
|
|
25
|
-
NPM_TOKEN: ${{ env.NPM_TOKEN }}
|
|
26
|
-
- name: Removing alpha tag from package json
|
|
27
|
-
run: chmod +x ./pre-release.sh && ./pre-release.sh
|
|
28
|
-
- id: publish
|
|
29
|
-
uses: JS-DevTools/npm-publish@v1
|
|
30
|
-
with:
|
|
31
|
-
token: ${{ env.NPM_TOKEN }}
|
|
32
|
-
dry-run: true
|
|
33
|
-
|
|
34
|
-
- if: steps.publish.outputs.type == 'none'
|
|
35
|
-
run: |
|
|
36
|
-
echo "Package JSON version is already published, please bump the version!"
|
|
37
|
-
exit 1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../../types/services/outbound/notification.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export namespace NotificationService {
|
|
2
|
-
export namespace Types {
|
|
3
|
-
export interface INotification {
|
|
4
|
-
title: string;
|
|
5
|
-
body: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface INotificationOptions {
|
|
9
|
-
notification: INotification;
|
|
10
|
-
registrationToken: string;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|