-
Notifications
You must be signed in to change notification settings - Fork 9
58 lines (48 loc) · 1.39 KB
/
release.yml
File metadata and controls
58 lines (48 loc) · 1.39 KB
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
51
52
53
54
55
56
57
58
name: release
on:
push:
branches:
- main
workflow_dispatch:
inputs:
dry_run:
description: 'Run semantic-release in dry-run mode'
required: false
type: boolean
default: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
semantic-release:
name: Semantic Release
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: '24'
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install Node.js dependencies
run: npm install
- name: Install bump-my-version
run: pip install bump-my-version
- name: Semantic Release (Dry Run)
if: github.event_name == 'workflow_dispatch' && inputs.dry_run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run semantic-release -- --dry-run
- name: Semantic Release
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.dry_run)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run semantic-release