Skip to content

Commit d2cc468

Browse files
committed
Update publish.yml
1 parent 02e58b9 commit d2cc468

File tree

1 file changed

+26
-40
lines changed

1 file changed

+26
-40
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,33 @@
11
name: Release @doist/eslint-plugin-doist package
22

33
on:
4-
release:
5-
types: [created]
4+
push:
5+
tags:
6+
- 'v*'
67

78
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
timeout-minutes: 60
11-
steps:
12-
- uses: actions/checkout@v1
13-
- uses: actions/setup-node@v1
14-
with:
15-
node-version: 12
16-
- run: npm ci
17-
- run: npm test
9+
publish:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 60
12+
steps:
13+
- uses: actions/checkout@v2
1814

19-
publish-npm:
20-
needs: build
21-
runs-on: ubuntu-latest
22-
timeout-minutes: 60
23-
steps:
24-
- uses: actions/checkout@v1
25-
- uses: actions/setup-node@v1
26-
with:
27-
node-version: 12
28-
registry-url: https://registry.npmjs.org/
29-
- run: npm ci
30-
- run: npm publish
31-
env:
32-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
15+
# Publish to GitHub package registry
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: 12
19+
registry-url: https://npm.pkg.github.com/
20+
scope: '@doist'
21+
- run: npm publish
22+
env:
23+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
3324

34-
publish-gpr:
35-
needs: build
36-
runs-on: ubuntu-latest
37-
timeout-minutes: 60
38-
steps:
39-
- uses: actions/checkout@v1
40-
- uses: actions/setup-node@v1
41-
with:
42-
node-version: 12
43-
registry-url: https://npm.pkg.github.com/
44-
- run: npm ci
45-
- run: npm publish
46-
env:
47-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
25+
# Publish to npm registry
26+
- uses: actions/setup-node@v1
27+
with:
28+
node-version: 12
29+
registry-url: https://registry.npmjs.org/
30+
scope: '@doist'
31+
- run: npm publish
32+
env:
33+
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}

0 commit comments

Comments
 (0)