Skip to content

Commit 10be6a0

Browse files
authored
Update autobuild.yml
1 parent 3b20a16 commit 10be6a0

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/autobuild.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ jobs:
2323
with:
2424
dotnet-version: 8.0.x
2525

26-
- name: Calculate next tag
26+
- name: Get last commit message
27+
id: last_commit
28+
run: |
29+
echo "commit_message=$(git log -1 --pretty=%B)" >> $GITHUB_OUTPUT
30+
31+
- name: Calculate next tag version
2732
id: tag
2833
shell: bash
2934
run: |
@@ -37,6 +42,8 @@ jobs:
3742
new_tag="$major.$minor.$patch"
3843
fi
3944
echo "new_tag=$new_tag" >> $GITHUB_OUTPUT
45+
git tag "$new_tag"
46+
git push origin "$new_tag"
4047
4148
- name: Build project
4249
run: dotnet publish $env:Project_Path -c Release -o $env:Output_Dir -r win-x64 `
@@ -51,10 +58,10 @@ jobs:
5158
- name: Create GitHub Release
5259
uses: softprops/action-gh-release@v2
5360
with:
54-
tag_name: ${{ steps.tag.outputs.new_tag }}-autobuild
55-
name: Release ${{ steps.tag.outputs.new_tag }}-autobuild
61+
tag_name: ${{ steps.tag.outputs.new_tag }}
62+
name: Release ${{ steps.tag.outputs.new_tag }}
5663
body: |
57-
${{ needs.build.steps.last_commit.outputs.commit_message }}
64+
${{ steps.last_commit.outputs.commit_message }}
5865
files: ${{ env.Output_Dir }}/*.exe
5966
env:
6067
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)