@hedia/types 2.1.36-alpha.0 → 2.1.36-alpha.1
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/ci.yml +3 -23
- package/.github/workflows/on-open-pr-publish-alpha.yaml +12 -21
- package/.github/workflows/on-post-merge-publish-package.yaml +1 -5
- package/.github/workflows/on-push-commit-bump-and-publish-alpha.yaml +31 -16
- package/.github/workflows/validate-pr-title.yaml +1 -0
- package/package.json +2 -2
- package/remove-alpha-tag.sh +2 -2
package/.github/workflows/ci.yml
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
name: Node.js CI
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
workflows: ["NPM - Version Bump & Publish Alpha", "NPM Bumper - Bump alpha version"]
|
|
6
|
-
types:
|
|
7
|
-
- completed
|
|
8
|
-
|
|
9
|
-
env:
|
|
10
|
-
SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
|
|
11
|
-
NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
|
|
4
|
+
pull_request:
|
|
12
5
|
|
|
13
6
|
jobs:
|
|
14
7
|
build:
|
|
15
|
-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
16
|
-
|
|
17
8
|
runs-on: ubuntu-latest
|
|
18
9
|
|
|
19
10
|
strategy:
|
|
@@ -22,23 +13,12 @@ jobs:
|
|
|
22
13
|
|
|
23
14
|
steps:
|
|
24
15
|
- uses: actions/checkout@v2
|
|
25
|
-
|
|
16
|
+
|
|
26
17
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
27
18
|
uses: actions/setup-node@v2
|
|
28
19
|
with:
|
|
29
20
|
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: |
|
|
35
|
-
${{ env.SSH_PRIVATE_KEY }}
|
|
36
|
-
|
|
37
|
-
- name: Register NPM access token
|
|
38
|
-
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
|
39
|
-
env:
|
|
40
|
-
NPM_TOKEN: ${{ env.NPM_TOKEN }}
|
|
41
|
-
|
|
21
|
+
|
|
42
22
|
- run: npm ci
|
|
43
23
|
env:
|
|
44
24
|
CI: true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: On open PR - Version Bump & Publish Alpha
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
@@ -7,11 +7,21 @@ on:
|
|
|
7
7
|
types: [opened]
|
|
8
8
|
|
|
9
9
|
env:
|
|
10
|
-
SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
|
|
11
10
|
NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
|
|
12
11
|
|
|
13
12
|
jobs:
|
|
13
|
+
validate-pr-labels:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Validate PR labels
|
|
18
|
+
uses: docker://agilepathway/pull-request-label-checker:v1.0.102
|
|
19
|
+
with:
|
|
20
|
+
one_of: major,minor,patch
|
|
21
|
+
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
|
|
14
23
|
on-open-pr-publish-alpha:
|
|
24
|
+
needs: [validate-pr-labels]
|
|
15
25
|
runs-on: ubuntu-latest
|
|
16
26
|
|
|
17
27
|
strategy:
|
|
@@ -28,23 +38,6 @@ jobs:
|
|
|
28
38
|
with:
|
|
29
39
|
node-version: ${{ matrix.node-version }}
|
|
30
40
|
|
|
31
|
-
- name: Register ssh keys
|
|
32
|
-
uses: webfactory/ssh-agent@v0.5.3
|
|
33
|
-
with:
|
|
34
|
-
ssh-private-key: |
|
|
35
|
-
${{ env.SSH_PRIVATE_KEY }}
|
|
36
|
-
|
|
37
|
-
- name: Register NPM access token
|
|
38
|
-
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
|
39
|
-
env:
|
|
40
|
-
NPM_TOKEN: ${{ env.NPM_TOKEN }}
|
|
41
|
-
|
|
42
|
-
- name: Validate PR labels
|
|
43
|
-
uses: docker://agilepathway/pull-request-label-checker:v1.0.102
|
|
44
|
-
with:
|
|
45
|
-
one_of: major,minor,patch
|
|
46
|
-
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
47
|
-
|
|
48
41
|
- name: Set identity
|
|
49
42
|
run: |
|
|
50
43
|
git config --global user.email "ci@hedia.co"
|
|
@@ -88,7 +81,6 @@ jobs:
|
|
|
88
81
|
git push
|
|
89
82
|
|
|
90
83
|
- name: Remove old comment from PR
|
|
91
|
-
if: steps.publish-alpha.outputs.type != 'none'
|
|
92
84
|
uses: izhangzhihao/delete-comment@master
|
|
93
85
|
with:
|
|
94
86
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -96,7 +88,6 @@ jobs:
|
|
|
96
88
|
issue_number: ${{ github.event.number }} # remove comments from the current PR
|
|
97
89
|
|
|
98
90
|
- name: Write comment on PR
|
|
99
|
-
if: steps.publish-alpha.outputs.type != 'none'
|
|
100
91
|
uses: peter-evans/create-or-update-comment@v1
|
|
101
92
|
with:
|
|
102
93
|
issue-number: ${{ github.event.number }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: On post-merge - Publish package
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
@@ -7,7 +7,6 @@ on:
|
|
|
7
7
|
types: [closed]
|
|
8
8
|
|
|
9
9
|
env:
|
|
10
|
-
SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
|
|
11
10
|
NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
|
|
12
11
|
|
|
13
12
|
jobs:
|
|
@@ -26,9 +25,6 @@ jobs:
|
|
|
26
25
|
with:
|
|
27
26
|
node-version: ${{ matrix.node-version }}
|
|
28
27
|
|
|
29
|
-
- name: Register NPM access token
|
|
30
|
-
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
|
31
|
-
|
|
32
28
|
- name: Publish package
|
|
33
29
|
id: publish-package
|
|
34
30
|
uses: JS-DevTools/npm-publish@v1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: On push - Bump & publish alpha version
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
@@ -7,13 +7,17 @@ on:
|
|
|
7
7
|
types: [synchronize]
|
|
8
8
|
|
|
9
9
|
env:
|
|
10
|
-
SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
|
|
11
10
|
NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
|
|
12
11
|
|
|
13
12
|
jobs:
|
|
14
13
|
on-push-commit-bump-and-publish-alpha:
|
|
15
14
|
runs-on: ubuntu-latest
|
|
16
15
|
|
|
16
|
+
outputs:
|
|
17
|
+
type: ${{ steps.publish-alpha.outputs.type }}
|
|
18
|
+
version: ${{ steps.publish-alpha.outputs.version }}
|
|
19
|
+
skip: ${{ env.CI_SKIP }}
|
|
20
|
+
|
|
17
21
|
strategy:
|
|
18
22
|
matrix:
|
|
19
23
|
node-version: [14.15]
|
|
@@ -22,33 +26,31 @@ jobs:
|
|
|
22
26
|
- uses: actions/checkout@v2
|
|
23
27
|
with:
|
|
24
28
|
ref: ${{ github.event.pull_request.head.ref }}
|
|
29
|
+
token: ${{ secrets.HEDIA_BOT_GITHUB_PAT }}
|
|
30
|
+
|
|
31
|
+
- uses: mstachniuk/ci-skip@v1
|
|
32
|
+
with:
|
|
33
|
+
commit-filter: "autobump"
|
|
25
34
|
|
|
26
35
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
36
|
+
if: ${{ env.CI_SKIP == 'false' }}
|
|
27
37
|
uses: actions/setup-node@v2
|
|
28
38
|
with:
|
|
29
39
|
node-version: ${{ matrix.node-version }}
|
|
30
40
|
|
|
31
|
-
- name: Register ssh keys
|
|
32
|
-
uses: webfactory/ssh-agent@v0.5.3
|
|
33
|
-
with:
|
|
34
|
-
ssh-private-key: |
|
|
35
|
-
${{ env.SSH_PRIVATE_KEY }}
|
|
36
|
-
|
|
37
|
-
- name: Register NPM access token
|
|
38
|
-
run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
|
39
|
-
env:
|
|
40
|
-
NPM_TOKEN: ${{ env.NPM_TOKEN }}
|
|
41
|
-
|
|
42
41
|
- name: Set identity
|
|
42
|
+
if: ${{ env.CI_SKIP == 'false' }}
|
|
43
43
|
run: |
|
|
44
44
|
git config --global user.email "ci@hedia.co"
|
|
45
45
|
git config --global user.name "Hedia CI Bot"
|
|
46
46
|
|
|
47
47
|
- name: Bump alpha version
|
|
48
|
+
if: ${{ env.CI_SKIP == 'false' }}
|
|
48
49
|
run: |
|
|
49
50
|
chmod +x ./on-push-commit-bump-alpha.sh && ./on-push-commit-bump-alpha.sh
|
|
50
51
|
|
|
51
52
|
- name: Publish alpha version
|
|
53
|
+
if: ${{ env.CI_SKIP == 'false' }}
|
|
52
54
|
id: publish-alpha
|
|
53
55
|
uses: JS-DevTools/npm-publish@v1
|
|
54
56
|
with:
|
|
@@ -62,12 +64,26 @@ jobs:
|
|
|
62
64
|
exit 1
|
|
63
65
|
|
|
64
66
|
- name: Remove alpha tag
|
|
67
|
+
if: ${{ env.CI_SKIP == 'false' }}
|
|
65
68
|
run: |
|
|
66
69
|
chmod +x ./remove-alpha-tag.sh && ./remove-alpha-tag.sh
|
|
67
70
|
git push
|
|
68
71
|
|
|
72
|
+
after-publish:
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
needs: [on-push-commit-bump-and-publish-alpha]
|
|
75
|
+
if: needs.on-push-commit-bump-and-publish-alpha.outputs.skip == 'false'
|
|
76
|
+
|
|
77
|
+
strategy:
|
|
78
|
+
matrix:
|
|
79
|
+
node-version: [14.15]
|
|
80
|
+
|
|
81
|
+
steps:
|
|
82
|
+
- uses: actions/checkout@v2
|
|
83
|
+
with:
|
|
84
|
+
ref: ${{ github.event.pull_request.head.ref }}
|
|
85
|
+
|
|
69
86
|
- name: Remove old comment from PR
|
|
70
|
-
if: steps.publish-alpha.outputs.type != 'none'
|
|
71
87
|
uses: izhangzhihao/delete-comment@master
|
|
72
88
|
with:
|
|
73
89
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -75,10 +91,9 @@ jobs:
|
|
|
75
91
|
issue_number: ${{ github.event.number }} # remove comments from the current PR
|
|
76
92
|
|
|
77
93
|
- name: Write comment on PR
|
|
78
|
-
if: steps.publish-alpha.outputs.type != 'none'
|
|
79
94
|
uses: peter-evans/create-or-update-comment@v1
|
|
80
95
|
with:
|
|
81
96
|
issue-number: ${{ github.event.number }}
|
|
82
97
|
body: |
|
|
83
98
|
🎉 Successfully released alpha version 🎉
|
|
84
|
-
✅ ${{
|
|
99
|
+
✅ ${{ needs.on-push-commit-bump-and-publish-alpha.outputs.version }}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hedia/types",
|
|
3
|
-
"version": "2.1.36-alpha.
|
|
4
|
-
"alphaVersionCounter": "
|
|
3
|
+
"version": "2.1.36-alpha.1",
|
|
4
|
+
"alphaVersionCounter": "1",
|
|
5
5
|
"description": "Enums, interfaces, and other common types for use in Hedia's software.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"repository": {
|
package/remove-alpha-tag.sh
CHANGED
|
@@ -12,8 +12,8 @@ git add package.json
|
|
|
12
12
|
|
|
13
13
|
if [ "$alphaVersion" = "" ] || [ $alphaVersion = "0" ];
|
|
14
14
|
then
|
|
15
|
-
git commit --amend -m "
|
|
15
|
+
git commit --amend -m "autobump ${versionNumber}-alpha.${alphaVersion}"
|
|
16
16
|
else
|
|
17
|
-
git commit -m "
|
|
17
|
+
git commit -m "autobump ${versionNumber}-alpha.${alphaVersion}"
|
|
18
18
|
fi
|
|
19
19
|
|