Skip to content

Commit

Permalink
chore: release v0.9.0 (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswanson-dfinity authored Jun 3, 2021
1 parent 41477a5 commit 17a54c4
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ on:

jobs:
build:
runs-on: ubuntu-latest
environment: Release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-18.04]
node:
- 14

steps:
- uses: actions/checkout@v2
Expand All @@ -19,20 +26,14 @@ jobs:
# set up git since we will later push to the repo
- run: git config --global user.name "GitHub CD bot"
- run: git config --global user.email "[email protected]"
# upgrade npm version in package.json to the tag used in the release.
- run: npm version ${{ github.event.release.tag_name }}
# build the project
- run: npm run build
- run: npm run build --workspaces
# run tests just in case
- run: npm test
- run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
# publish to NPM -> there is one caveat, continue reading for the fix
- run: npm run release --workspaces --if-present --tag ${{ github.event.release.target_commitish }}
- run: npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
env:
# Use a token to publish to NPM. See below for how to set it up
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# push the version changes to GitHub
- run: git push
env:
# The secret is passed automatically. Nothing to configure.
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: npm whoami
# publish to NPM -> there is one caveat, continue reading for the fix
- run: npm publish --workspaces --access public

0 comments on commit 17a54c4

Please sign in to comment.