Skip to content

Commit

Permalink
fix: update release action
Browse files Browse the repository at this point in the history
  • Loading branch information
maasencioh committed Nov 8, 2021
1 parent 8e96c01 commit 9fe0471
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,33 @@ on:
branches:
- master

env:
NODE_VERSION: 16.x

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Get package name
run: echo "PACKAGE_NAME=$(jq .name package.json | tr -d '"')" >> $GITHUB_ENV
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.BOT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
package-name: 'ndim-parser'
package-name: ${{ env.PACKAGE_NAME }}
bump-minor-pre-major: Yes
- uses: actions/checkout@v2
# These if statements ensure that a publication only occurs when a new release is created
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: npm install
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOT_TOKEN }}
if: ${{ steps.release.outputs.release_created }}

0 comments on commit 9fe0471

Please sign in to comment.