Skip to content

Publish Sparkle Alpha #310

Publish Sparkle Alpha

Publish Sparkle Alpha #310

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 }}