Skip to content

Commit 3ad936e

Browse files
committed
Enhance GitHub Actions workflow to support tagging on pushes and automate GitHub Releases by creating a release and uploading the OS binary artifact, improving deployment efficiency.
1 parent 64ad938 commit 3ad936e

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- main
7+
tags:
8+
- '*'
79
pull_request:
810

911
jobs:
@@ -36,8 +38,20 @@ jobs:
3638
make clean
3739
sudo ./build.sh
3840
39-
- name: Upload OS build artifact
40-
uses: actions/upload-artifact@v4
41+
- name: Create GitHub Release
42+
id: create_release
43+
uses: softprops/action-gh-release@v1
4144
with:
42-
name: os-build
43-
path: ./bin/os.bin
45+
tag_name: ${{ env.VERSION }}
46+
name: Build OS ${{ env.VERSION }}
47+
draft: false
48+
prerelease: false
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Upload OS binary to Release
53+
uses: softprops/action-gh-release@v1
54+
with:
55+
files: ./bin/os.bin
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)