Skip to content

Commit 7686397

Browse files
committed
chore: create a drafted release when tagging a commit
1 parent dc014e9 commit 7686397

File tree

1 file changed

+48
-3
lines changed

1 file changed

+48
-3
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
name: Build firmware
2+
permissions:
3+
contents: write
4+
25
on:
36
push:
47
branches:
58
- dev
9+
- chore/release
10+
tags:
11+
- 'v*'
612

713
jobs:
814
build:
9-
runs-on: buildjet-16vcpu-ubuntu-2204
15+
runs-on: buildjet-16vcpu-ubuntu-2204
1016
name: Build
1117
steps:
1218
- name: Checkout
@@ -40,10 +46,49 @@ jobs:
4046
with:
4147
name: OTA Image
4248
path: output/image/update_ota.tar
43-
retention-days: 30
49+
retention-days: 7
4450
- name: Upload Full image
4551
uses: actions/upload-artifact@v4
4652
with:
4753
name: Full Image
4854
path: output/image/update.img
49-
retention-days: 30
55+
retention-days: 7
56+
- name: Create compressed buildkit
57+
run: |
58+
tar "-I zstd -10 -T0 --long=31" -cf \
59+
buildkit.tar.zst \
60+
tools/linux/toolchain \
61+
media/out/include \
62+
media/out/lib
63+
- name: Upload buildkit
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: jetkvm-native-buildkit
67+
path: buildkit.tar.zst
68+
retention-days: 7
69+
compression-level: 0
70+
71+
release:
72+
# no need to use buildjet runners, as we only need to create a release
73+
runs-on: ubuntu-latest
74+
name: Release
75+
needs: build
76+
if: startsWith(github.ref, 'refs/tags/')
77+
steps:
78+
- name: Checkout
79+
uses: actions/checkout@v4
80+
- name: Download artifacts
81+
uses: actions/download-artifact@v4
82+
- name: Draft release
83+
uses: softprops/action-gh-release@v2
84+
with:
85+
# need review before making a real release
86+
draft: true
87+
files: |
88+
./OTA Image/update_ota.tar
89+
./Full Image/update.img
90+
./jetkvm-native-buildkit/buildkit.tar.zst
91+
fail_on_unmatched_files: true
92+
tag_name: ${{ github.ref }}
93+
name: ${{ github.ref }}
94+
generate_release_notes: true

0 commit comments

Comments
 (0)