Merge pull request #564 from opengovsg/release-v1.10.0 #45
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 (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 }} |