-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (41 loc) · 1.15 KB
/
release.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
39
40
41
42
43
44
45
46
47
48
49
50
#-----------------------------
# CI Github Action: Release
#-----------------------------
name: Release
on:
workflow_dispatch:
inputs:
dryRun:
type: boolean
default: true
required: false
description: 'Run in dry-run mode (no actual release)'
env:
node-version: 20.x
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node v${{ env.node-version }}
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ env.node-version }}
- name: Install NPM Dependencies
run: npm ci
- name: Run Semantic Release in Dry Run mode
if: ${{ inputs.dryRun }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: npx semantic-release --dry-run
- name: Run Semantic Release
if: ${{ !inputs.dryRun }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: npx semantic-release