Merge pull request #442 from G7DAO/fix-old-npm-publish-workflow #3
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: Release Game7 Bridge SDK library | |
on: | |
push: | |
tags: | |
- "game7-bridge-sdk-v*" | |
jobs: | |
release_game7-bridge-sdk: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository and main branch | |
uses: actions/checkout@v2 | |
- name: Set up node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20.14.0" | |
- name: Build and install dependencies | |
working-directory: ./packages/game7-bridge-sdk | |
run: | | |
npm install | |
npm run build | |
- name: Configure npm with auth token | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPMJS_GAME7_BRIDGE_SDK_AUTH_TOKEN }}" > ~/.npmrc | |
- name: Publish package | |
working-directory: ./packages/game7-bridge-sdk | |
run: npm publish --access public | |
- name: Clean up | |
if: always() | |
run: | | |
rm ~/.npmrc |