Skip to content

feat(Publish): add canary publish functional for release/*.0 branch… #1

feat(Publish): add canary publish functional for release/*.0 branch…

feat(Publish): add canary publish functional for release/*.0 branch… #1

name: Publish canary version to NPM
on:
push:
branches:
- 'release/*.0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: 📥 Install dependencies
run: npm ci
- name: 🔧 Build
run: |
BRANCH_NAME=${{ github.ref }}
COMMIT_SHA=${{ github.sha }}
npm run build -- --pure --canary $BRANCH_NAME --commitSHA $COMMIT_SHA
- name: 📦 Publish package on NPM
run: cd dist && npm publish --access public --tag canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_ACCESS_TOKEN }}