Skip to content

Commit

Permalink
chore: add npm publish step to the release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzianis Dashkevich committed Feb 28, 2023
1 parent 6dd806f commit a8306cd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@ jobs:
with:
node-version: '${{steps.nvm.outputs.NVMRC}}'
cache: npm
# this line is required for the setup-node action to be able to run the npm publish below.
registry-url: 'https://registry.npmjs.org'

- name: npm install
run: npm i --prefer-offline --no-audit

- name: build
run: npm run build-prod || npm run build --if-present
# publish runs build for us via a prepublishOnly script
- name: npm release
run: npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Check if this is a pre-release
run: echo ::set-output name=IS_PRE_RELEASE::$(npx -p not-prerelease is-prerelease && echo "true" || echo "false")
Expand Down

0 comments on commit a8306cd

Please sign in to comment.