Skip to content

Manual Release

Manual Release #21

Workflow file for this run

name: Manual Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release: "X.Y.Z", or "X.Y.Z-beta" for beta'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: 'blob:none'
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: yarn install
- run: git config --local user.email "[email protected]"
- run: git config --local user.name "GitHub Action"
#- run: yarn config set version-sign-git-tag true
- run: |
if [[ ${{ github.event.inputs.version }} == *"-"* ]]; then
yarn publish --new-version ${{ github.event.inputs.version }} --tag=beta
else
yarn publish --new-version ${{ github.event.inputs.version }}
fi
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: git push --tags