Skip to content

Commit c25837e

Browse files
authored
add version bump workflow
add version bump workflow.
2 parents 3ee9dbd + f658731 commit c25837e

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/version-bump.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Version Bump
2+
# Create the next available tag (based on commit comment)
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
run_for_real:
8+
required: true
9+
default: false
10+
type: boolean
11+
description: "Apply next tag (or Dry Run)"
12+
default_bump:
13+
required: true
14+
default: "minor"
15+
type: choice
16+
options: ['major', 'minor', 'patch', 'none']
17+
description: "Default Version Bump"
18+
19+
concurrency: production
20+
21+
jobs:
22+
Tagging:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
token: ${{ secrets.SC_GH_TAG_TOKEN }}
28+
fetch-depth: '0'
29+
- name: Determine Tag Details
30+
id: taggerDryRun
31+
uses: anothrNick/github-tag-action@v1
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.SC_GH_TAG_TOKEN }}
34+
DEFAULT_BUMP: ${{ inputs.default_bump }}
35+
WITH_V: true
36+
DRY_RUN: true
37+
- name: Tag Details
38+
run: |
39+
echo "The next tag version will be: ${{ steps.taggerDryRun.outputs.new_tag }}"
40+
echo "The version increment was: ${{ steps.taggerDryRun.outputs.part }}"
41+
- name: Run Tagging
42+
if: ${{ inputs.run_for_real }}
43+
id: taggerApply
44+
uses: anothrNick/github-tag-action@v1
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.SC_GH_TAG_TOKEN }}
47+
DEFAULT_BUMP: ${{ inputs.default_bump }}
48+
WITH_V: true

0 commit comments

Comments
 (0)