Skip to content

Commit

Permalink
Fix ci publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrasser committed Sep 29, 2022
1 parent 97e58eb commit 88592a4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
node-version: 'lts/*'
cache: 'npm'
- run: npm install
- name: "Setup dist"
Expand All @@ -48,23 +48,3 @@ jobs:
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

publish:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: integration
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
cache: 'npm'
- run: npm install
- run: npm publish --workspaces
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm dist:postpublish
- uses: actions/upload-artifact@v2
with:
name: linkify
path: dist/
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish

on:
push:
tags: ['*']

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 'lts/*'
cache: 'npm'
- name: Configure npm
run: |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
cat .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm install
- run: npm publish --workspaces
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm dist:postpublish
- uses: actions/upload-artifact@v2
with:
name: linkify
path: dist/

0 comments on commit 88592a4

Please sign in to comment.