Skip to content

Commit

Permalink
chore: fix publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
aimee-gm committed Sep 4, 2023
1 parent b20e547 commit a57a831
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@ name: Publish NPM package

on:
release:
types: [created]
types:
- released

jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: ".nvmrc"
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: yarn
- name: Build package
run: yarn build
- name: Set correct version
if: ${{ !startsWith(github.ref, 'refs/heads') }}
run: yarn version --no-git-tag-version --new-version $VERSION
env:
VERSION: ${{ github.event.release.tag_name }}
- name: Publish to NPM
run: yarn publish --non-interactive
env:
Expand Down

0 comments on commit a57a831

Please sign in to comment.