Skip to content

Commit

Permalink
ci: Publish npm package in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Aug 27, 2023
1 parent 2fa30b3 commit f2fe76a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,22 @@ jobs:
run: |
yarn
yarn lint
publish:
if: startsWith(github.ref, 'refs/tags/')
needs: [build, lint]
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set package version
run: |
npm config set git-tag-version=false
npm version $(git describe --tags)
- name: Publish npm package
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}

0 comments on commit f2fe76a

Please sign in to comment.