Publish Sparkle Alpha #310
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Sparkle Alpha | |
on: | |
workflow_dispatch: | |
inputs: | |
versionSuffix: | |
description: "Version Suffix (e.g. alpha, beta, rc)" | |
required: false | |
default: "rc" | |
concurrency: | |
group: publish_sparkle_suffix | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.13.0 | |
cache: "npm" | |
cache-dependency-path: ./sparkle/package-lock.json | |
registry-url: "https://registry.npmjs.org" | |
- name: Update package.json version with suffix | |
working-directory: sparkle | |
run: | | |
CURRENT_VERSION=$(node -p "require('./package.json').version") | |
SUFFIX_VERSION="${CURRENT_VERSION}-${{ github.event.inputs.versionSuffix }}" | |
npm version $SUFFIX_VERSION --no-git-tag-version | |
- name: Install dependencies, build and publish | |
working-directory: sparkle | |
run: npm ci && npm run build && npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |