Release v1.3.0 #134
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to NPM on Github Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.NITRIC_BOT_TOKEN }} | |
- name: Cache Dependencies | |
uses: actions/cache@v2 | |
with: | |
path: 'node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} | |
- name: Use Node 20 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20 | |
registry-url: 'https://registry.npmjs.org' | |
always-auth: true | |
- name: Git Identity | |
run: | | |
git config --global user.name 'nitric-bot[bot]' | |
git config --global user.email '[email protected]' | |
- name: Set Version | |
# Tag will already be created by release flow | |
run: npm version --no-git-tag-version ${{ github.event.release.tag_name }} | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build | |
run: yarn build | |
- name: Publish latest to NPM | |
if: '!github.event.release.prerelease' | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish latest RC to NPM | |
if: 'github.event.release.prerelease' | |
run: npm publish --access public --tag rc-latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |