Skip to content

Merge pull request #442 from G7DAO/fix-old-npm-publish-workflow #3

Merge pull request #442 from G7DAO/fix-old-npm-publish-workflow

Merge pull request #442 from G7DAO/fix-old-npm-publish-workflow #3

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