@hedia/types 2.1.32-alpha.3 → 2.1.32-alpha.4
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 +18 -5
- package/README.md +8 -0
- package/alpha-release.sh +0 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +3 -2
- package/types/index.ts +0 -1
- package/.github/workflows/publish.yml +0 -37
- package/.github/workflows/version-check.yml +0 -37
|
@@ -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
|
-
🎉Successfully released alpha version🎉
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
🎉 Successfully released alpha version 🎉
|
|
54
|
+
✅ ${{ steps.publish-alpha.outputs.version }}
|
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# **Hedia types**
|
|
2
|
+
|
|
3
|
+
### **Auto-publishing to npm as an alpha-version package**
|
|
4
|
+
|
|
5
|
+
In order to easily test our npm packages, auto-publishing of an alpha version to npm has been implemented.
|
|
6
|
+
This will allow testers to easily install and test npm packages as they’ll be automatically published to npm at the moment of creating a Pull Request on GitHub.
|
|
7
|
+
|
|
8
|
+
More detailed information can be found here: <https://hedia.atlassian.net/wiki/spaces/DT/pages/2118811649/npm+packages+-+alpha+version+auto-publishing>
|
package/alpha-release.sh
CHANGED
|
File without changes
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,6 +2,5 @@ export * from "./activity/activity";
|
|
|
2
2
|
export * from "./boluscalculator/boluscalculator";
|
|
3
3
|
export * from "./logbook/logbook";
|
|
4
4
|
export * from "./services/outbound/email";
|
|
5
|
-
export * from "./services/outbound/notification";
|
|
6
5
|
export * from "./userdetails/userdetails";
|
|
7
6
|
export * from "./usersettings/usersettings";
|
package/dist/types/index.js
CHANGED
|
@@ -14,7 +14,6 @@ __exportStar(require("./activity/activity"), exports);
|
|
|
14
14
|
__exportStar(require("./boluscalculator/boluscalculator"), exports);
|
|
15
15
|
__exportStar(require("./logbook/logbook"), exports);
|
|
16
16
|
__exportStar(require("./services/outbound/email"), exports);
|
|
17
|
-
__exportStar(require("./services/outbound/notification"), exports);
|
|
18
17
|
__exportStar(require("./userdetails/userdetails"), exports);
|
|
19
18
|
__exportStar(require("./usersettings/usersettings"), exports);
|
|
20
19
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,oEAAkD;AAClD,oDAAkC;AAClC,4DAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,oEAAkD;AAClD,oDAAkC;AAClC,4DAA0C;AAC1C,4DAA0C;AAC1C,8DAA4C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hedia/types",
|
|
3
|
-
"version": "2.1.32-alpha.
|
|
3
|
+
"version": "2.1.32-alpha.4",
|
|
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",
|
package/types/index.ts
CHANGED
|
@@ -2,6 +2,5 @@ export * from "./activity/activity";
|
|
|
2
2
|
export * from "./boluscalculator/boluscalculator";
|
|
3
3
|
export * from "./logbook/logbook";
|
|
4
4
|
export * from "./services/outbound/email";
|
|
5
|
-
export * from "./services/outbound/notification";
|
|
6
5
|
export * from "./userdetails/userdetails";
|
|
7
6
|
export * from "./usersettings/usersettings";
|
|
@@ -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
|