Skip to content

Commit 85b814e

Browse files
committed
build(release): enhance workflow with manual trigger and conditional build steps
1 parent 26d4899 commit 85b814e

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
on:
2+
workflow_dispatch:
23
push:
3-
tags:
4-
- 'v*'
4+
branches:
5+
- main
56

67
jobs:
78
build-and-release:
@@ -13,18 +14,29 @@ jobs:
1314
- name: Checkout code
1415
uses: actions/checkout@v4
1516

17+
- uses: TriPSs/conventional-changelog-action@v5
18+
id: changelog
19+
with:
20+
output-file: "false"
21+
github-token: ${{ secrets.github_token }}
22+
1623
- name: Make build script executable
24+
if: ${{ steps.changelog.outputs.skipped == 'false' }}
1725
run: chmod +x ./build.sh
1826

1927
- name: Run build script
20-
run: ./build.sh
28+
if: ${{ steps.changelog.outputs.skipped == 'false' }}
29+
run: ./build.sh ${{ steps.changelog.outputs.version }}
2130

2231
- name: Create Release
2332
id: create_release
33+
if: ${{ steps.changelog.outputs.skipped == 'false' }}
2434
uses: softprops/action-gh-release@v1
2535
with:
2636
files: ./target/hawk-auth-server-extension.jar
27-
name: Release ${{ github.ref_name }}
37+
body: ${{ steps.changelog.outputs.clean_changelog }}
38+
tag_name: ${{ steps.changelog.outputs.tag }}
39+
name: ${{ steps.changelog.outputs.tag }}
2840
draft: false
2941
prerelease: false
3042
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)