-
Notifications
You must be signed in to change notification settings - Fork 112
38 lines (33 loc) · 1.08 KB
/
publish-sparkle-rc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 }}