Skip to content

Commit 3d196cd

Browse files
committed
rework CI
1 parent e66cb93 commit 3d196cd

1 file changed

Lines changed: 25 additions & 12 deletions

File tree

.github/workflows/publish-github.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,32 @@ name: Node.js Package
22
on:
33
release:
44
types: [created]
5+
56
jobs:
67
build:
78
runs-on: ubuntu-latest
89
steps:
9-
- uses: actions/checkout@v2
10-
# Setup .npmrc file to publish to GitHub Packages
11-
- uses: actions/setup-node@v1
12-
with:
13-
node-version: '12.x'
14-
registry-url: 'https://npm.pkg.github.com'
15-
# Defaults to the user or organization that owns the workflow file
16-
# scope: '@octocat'
17-
- run: yarn
18-
- run: yarn publish
19-
env:
20-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10+
- uses: actions/checkout@v2
11+
# Setup .npmrc file to publish to GitHub Packages
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: "12.x"
15+
registry-url: "https://npm.pkg.github.com"
16+
# Defaults to the user or organization that owns the workflow file
17+
# scope: '@octocat'
18+
- run: yarn
19+
- run: yarn build
20+
21+
publish-gpr:
22+
needs: build
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: actions/setup-node@v1
27+
with:
28+
node-version: 12
29+
registry-url: $registry-url(npm)
30+
- run: yarn build
31+
- run: yarn publish
32+
env:
33+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)