Skip to content

Commit 1ce9fdf

Browse files
committed
feat(workflows): Create a release workflow
To understand the modifications, please refer to the gitdiff below. Signed-off-by: ioit-aaa <211367176+ioit-aaa@users.noreply.github.com>
1 parent 48af98c commit 1ce9fdf

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/RELEASE.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
jobs:
2+
changelog:
3+
name: Generate changelog
4+
runs-on: ubuntu-latest
5+
outputs:
6+
release_body: ${{ steps.git-cliff.outputs.content }}
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v6
10+
with:
11+
fetch-depth: 0
12+
13+
- name: Generate a changelog
14+
uses: orhun/git-cliff-action@v4
15+
id: git-cliff
16+
with:
17+
config: cliff.toml
18+
args: -vv --latest --strip header
19+
env:
20+
OUTPUT: CHANGES.md
21+
GITHUB_REPO: ${{ github.repository }}
22+
23+
# use release body in the same job
24+
- name: Upload the binary releases
25+
uses: svenstaro/upload-release-action@v2
26+
with:
27+
file: binary_release.zip
28+
repo_token: ${{ secrets.GITHUB_TOKEN }}
29+
tag: ${{ github.ref }}
30+
body: ${{ steps.git-cliff.outputs.content }}
31+
32+
# use release body in another job
33+
upload:
34+
name: Upload the release
35+
needs: changelog
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Upload the binary releases
39+
uses: svenstaro/upload-release-action@v2
40+
with:
41+
repo_token: ${{ secrets.GITHUB_TOKEN }}
42+
tag: ${{ github.ref }}
43+
body: ${{ needs.changelog.outputs.release_body }}

0 commit comments

Comments
 (0)