Skip to content

Commit fe0b344

Browse files
committed
Correct package publish scripts
1 parent b212282 commit fe0b344

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.github/workflows/js_test.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@ jobs:
66
build:
77

88
runs-on: ubuntu-latest
9-
10-
strategy:
11-
matrix:
12-
node-version: [12.x]
13-
149
steps:
1510
- uses: actions/checkout@v1
1611
- name: Use Node.js ${{ matrix.node-version }}
1712
uses: actions/setup-node@v1
1813
with:
19-
node-version: ${{ matrix.node-version }}
14+
node-version: 12
2015
- name: npm install, build, and test
2116
run: |
2217
npm ci

.github/workflows/publish.yml

+16
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ on:
55
types: [created]
66

77
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Use Node.js ${{ matrix.node-version }}
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
- name: npm install, build, and test
17+
run: |
18+
npm ci
19+
npm run build --if-present
20+
npm test
21+
env:
22+
CI: true
23+
824
publish-npm:
925
needs: build
1026
runs-on: ubuntu-latest

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"scripts": {
2626
"test": "eslint .",
2727
"preversion": "npm run test",
28-
"postversion": "git push --tags && npm run publish . --new-version $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\"",
28+
"postversion": "git push --tags && git push && hub release create --browse $npm_package_version",
2929
"run-if-changed": "./run-if-changed.js"
3030
},
3131
"husky": {

0 commit comments

Comments
 (0)