Skip to content

Commit 88592a4

Browse files
author
Nick Frasser
committed
Fix ci publish workflow
1 parent 97e58eb commit 88592a4

File tree

2 files changed

+31
-21
lines changed

2 files changed

+31
-21
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/checkout@v2
3535
- uses: actions/setup-node@v2
3636
with:
37-
node-version: '16.x'
37+
node-version: 'lts/*'
3838
cache: 'npm'
3939
- run: npm install
4040
- name: "Setup dist"
@@ -48,23 +48,3 @@ jobs:
4848
uses: coverallsapp/[email protected]
4949
with:
5050
github-token: ${{ secrets.GITHUB_TOKEN }}
51-
52-
publish:
53-
runs-on: ubuntu-latest
54-
if: "startsWith(github.ref, 'refs/tags/')"
55-
needs: integration
56-
steps:
57-
- uses: actions/checkout@v2
58-
- uses: actions/setup-node@v2
59-
with:
60-
node-version: '16.x'
61-
cache: 'npm'
62-
- run: npm install
63-
- run: npm publish --workspaces
64-
env:
65-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
66-
- run: npm dist:postpublish
67-
- uses: actions/upload-artifact@v2
68-
with:
69-
name: linkify
70-
path: dist/

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags: ['*']
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 'lts/*'
15+
cache: 'npm'
16+
- name: Configure npm
17+
run: |
18+
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
19+
cat .npmrc
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22+
- run: npm install
23+
- run: npm publish --workspaces
24+
env:
25+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26+
- run: npm dist:postpublish
27+
- uses: actions/upload-artifact@v2
28+
with:
29+
name: linkify
30+
path: dist/

0 commit comments

Comments
 (0)