Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
remcohaszing committed Jul 21, 2022
1 parent 2bcfa72 commit ded06ae
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ jobs:
- run: npm ci
- run: npx eslint .

pack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npm pack
- uses: actions/upload-artifact@v3
with:
name: package
path: '*.tgz'

test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -52,3 +66,18 @@ jobs:
node-version: 18
- run: npm ci
- run: npx tsc

release:
runs-on: ubuntu-latest
needs: [eslint, test, pack, prettier, tsc]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
- uses: actions/download-artifact@v3
with: { name: package }
- run: npm publish *.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit ded06ae

Please sign in to comment.