@hedia/types 2.1.25 → 2.1.26-alpha.32

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.
@@ -1,5 +1,8 @@
1
1
  name: Publish alpha
2
-
2
+
3
+ on:
4
+ pull_request:
5
+
3
6
  env:
4
7
  SSH_PRIVATE_KEY: ${{ secrets.HEDIA_BOT_PRIVATE_SSH_KEY }}
5
8
  NPM_TOKEN: ${{ secrets.HEDIA_BOT_NPM_TOKEN }}
@@ -9,11 +12,10 @@ jobs:
9
12
  runs-on: ubuntu-latest
10
13
  steps:
11
14
  - uses: actions/checkout@v1
12
- - uses: actions/setup-node@v1
15
+ - name: Use Node.js ${{ matrix.node-version }}
16
+ uses: actions/setup-node@v1.4.4
13
17
  with:
14
- node-version: 10
15
- - run: npm install
16
- - run: npm test
18
+ node-version: ${{ matrix.node-version }}
17
19
  - uses: JS-DevTools/npm-publish@v1
18
20
  with:
19
21
  token: ${{ env.NPM_TOKEN }}
@@ -30,6 +30,8 @@ jobs:
30
30
  ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
31
31
  - name: Register NPM access token
32
32
  run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
33
+ - name: Removing alpha tag from package json
34
+ run: chmod +x ./post-release.sh && ./post-release.sh
33
35
  - id: publish
34
36
  uses: JS-DevTools/npm-publish@v1
35
37
  with:
@@ -30,6 +30,8 @@ jobs:
30
30
  run: npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
31
31
  env:
32
32
  NPM_TOKEN: ${{ env.NPM_TOKEN }}
33
+ - name: Removing alpha tag from package json
34
+ run: chmod +x ./post-release.sh && ./post-release.sh
33
35
  - id: publish
34
36
  uses: JS-DevTools/npm-publish@v1
35
37
  with:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/types",
3
- "version": "2.1.25",
3
+ "version": "2.1.26-alpha.32",
4
4
  "description": "Enums, interfaces, and other common types for use in Hedia's software.",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -0,0 +1,6 @@
1
+ alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
2
+ if [ "$alphaNumber" != "" ];
3
+ then
4
+ sed -i 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\)\(-alpha\.\)\([0-9]\+\)\("\)/\1\4/' package.json
5
+ echo "Removing alpha bit!"
6
+ fi
package/pre-release.sh ADDED
@@ -0,0 +1,12 @@
1
+ #alias bingo = "$OSTYPE" == "linux-gnu" ? "sed" : "sed"
2
+ alphaNumber="$(sed -n 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)\(,\)/\2/p' package.json)"
3
+ bumped="$((alphaNumber+1))"
4
+ if [ "$alphaNumber" = "" ];
5
+ then
6
+ sed -i 's/\("version": "\)\([0-9]\+\.[0-9]\+\.[0-9]\+\)\("\)/\1\2\-alpha.1\3/' package.json
7
+ else
8
+ echo $bumped
9
+ sed -i 's/\("version": "[0-9]\+\.[0-9]\+\.[0-9]\+\-alpha\.\)\([0-9]\+\)\("\)/\1'$bumped'\3/' package.json
10
+ fi
11
+
12
+ git commit package.json -m "bump alpha release to ${bumped}"