Skip to content

Commit ef3523e

Browse files
committed
release package yml
1 parent 360ae67 commit ef3523e

File tree

2 files changed

+31
-18
lines changed

2 files changed

+31
-18
lines changed

.github/workflows/npm-publish.yml

+1-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3-
41
name: Test
52

63
on: push
@@ -14,18 +11,4 @@ jobs:
1411
with:
1512
node-version: 14
1613
- run: npm i
17-
- run: npm test
18-
19-
# publish-gpr:
20-
# needs: build
21-
# runs-on: ubuntu-latest
22-
# steps:
23-
# - uses: actions/checkout@v2
24-
# - uses: actions/setup-node@v2
25-
# with:
26-
# node-version: 14
27-
# registry-url: https://npm.pkg.github.com/
28-
# - run: npm ci
29-
# - run: npm publish
30-
# env:
31-
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
14+
- run: npm test

.github/workflows/release-package.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Node.js Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 14
15+
- run: npm ci
16+
- run: npm test
17+
18+
publish-gpr:
19+
needs: build
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: 14
26+
registry-url: https://npm.pkg.github.com/
27+
- run: npm ci
28+
- run: npm publish
29+
env:
30+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)