Skip to content

Commit 258b5fb

Browse files
committed
ci: đź‘· Update workflows to support version tagging and enhance version release process
1 parent 125974f commit 258b5fb

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

‎.github/workflows/dotnet-build.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Build
33
on:
44
push:
55
branches: ["master", "feature/ci"]
6+
tags:
7+
- 'v*'
68

79
env:
810
project: ResoniteMetricsCounter

‎.github/workflows/version.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'Version to release'
7+
description: 'Version to release "MAJOR.MINOR.PATCH.REVISION"'
88
required: true
99

1010
jobs:
@@ -28,10 +28,17 @@ jobs:
2828
FILE=$(find . -name "*.csproj" | head -n 1)
2929
sed -i "s/>${{ steps.get_version.outputs.previousVersion }}/>${{ github.event.inputs.version }}/" $FILE
3030
31+
- name: Create tag
32+
run: |
33+
git tag -v${{ github.event.inputs.version }}
3134
- name: Commit changes
3235
run: |
3336
git config --local user.name "github-actions[bot]"
3437
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
3538
git add .
3639
git commit -m "chore: 📦️ v${{ github.event.inputs.version }}"
40+
41+
- name: Push changes
42+
run: |
3743
git push
44+
git push --tags

0 commit comments

Comments
 (0)