-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (53 loc) · 1.7 KB
/
Copy pathversion.yml
File metadata and controls
62 lines (53 loc) · 1.7 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
59
60
61
62
name: Version Management
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
type: choice
options:
- patch
- minor
- major
dry_run:
description: 'Dry run (preview changes without applying)'
required: false
type: boolean
default: false
jobs:
bump-version:
name: Bump Version
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup project dependencies with Pantry
uses: pantry-pm/pantry/packages/action@v0.11.28
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version (dry-run)
if: ${{ inputs.dry_run }}
run: bun scripts/release.ts ${{ inputs.release_type }} --dry-run
# Same entry point as `pantry run release:<level>` locally: preflight, then
# bumpx over the explicit manifest list, logsmith for the changelog, commit,
# tag, push. The tag push is what starts release.yml.
- name: Bump version and push
if: ${{ !inputs.dry_run }}
run: bun scripts/release.ts ${{ inputs.release_type }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Show result
if: success()
run: |
echo "Version bump completed successfully!"
echo "New version tag has been pushed and will trigger the release workflow."