Skip to content

Package Publish

Package Publish #59

Workflow file for this run

name: Package Publish
on:
workflow_dispatch:
inputs:
beta:
description: Beta release
required: true
type: boolean
relno:
description: Release No.
required: false
default: 1
type: number
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup registry
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Set beta version
if: ${{ inputs.beta }}
run: |
version=$(npm run env | grep npm_package_version | cut -d = -f 2)
npm version --no-git-tag-version --allow-same-version $version-beta.${{ inputs.relno }}
- name: Publish package
run: |
[[ ${{ inputs.beta }} != false ]] && tag=beta || tag=latest
echo tag: $tag
npm publish --access public --tag $tag
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}