|
1 | 1 | name: Build firmware
|
| 2 | +permissions: |
| 3 | + contents: write |
| 4 | + |
2 | 5 | on:
|
3 | 6 | push:
|
4 | 7 | branches:
|
5 | 8 | - dev
|
| 9 | + - chore/release |
| 10 | + tags: |
| 11 | + - 'v*' |
6 | 12 |
|
7 | 13 | jobs:
|
8 | 14 | build:
|
9 |
| - runs-on: buildjet-16vcpu-ubuntu-2204 |
| 15 | + runs-on: buildjet-16vcpu-ubuntu-2204 |
10 | 16 | name: Build
|
11 | 17 | steps:
|
12 | 18 | - name: Checkout
|
@@ -40,10 +46,49 @@ jobs:
|
40 | 46 | with:
|
41 | 47 | name: OTA Image
|
42 | 48 | path: output/image/update_ota.tar
|
43 |
| - retention-days: 30 |
| 49 | + retention-days: 7 |
44 | 50 | - name: Upload Full image
|
45 | 51 | uses: actions/upload-artifact@v4
|
46 | 52 | with:
|
47 | 53 | name: Full Image
|
48 | 54 | 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