Skip to content

NPM Canary release

NPM Canary release #1

Workflow file for this run

name: Canary release
on: workflow_dispatch
permissions:
packages: write
contents: read
jobs:
canary-publish:
name: Publish Packages (canary)
if: github.repository == 'hai-on-op/sdk-private'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'
scope: '@hai-on-op'
- run: yarn
- run: yarn build
- name: Set up Git user
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Publish Canary Version
run: |
echo "Publishing canary version..."
npm version prerelease --preid "${GITHUB_SHA::8}" --no-git-tag-version
npm publish --tag canary
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}