Skip to content

Merge pull request #564 from opengovsg/release-v1.10.0 #45

Merge pull request #564 from opengovsg/release-v1.10.0

Merge pull request #564 from opengovsg/release-v1.10.0 #45

Workflow file for this run

name: Publish (React)
defaults:
run:
working-directory: react
on:
push:
branches:
- alpha
- beta
- latest
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Load Node.js modules
uses: actions/cache@v2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
- run: npm publish --tag ${{ github.ref_name }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}