-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (71 loc) · 2.01 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Bob the Builder
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build Latest Commit
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Restore Cache of dl/
uses: actions/cache@v3
with:
path: dl/
key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*') }}
restore-keys: |
dl-
- name: Restore Cache of .ccache/
uses: actions/cache@v3
with:
path: .ccache/
key: ccache-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*') }}
restore-keys: |
ccache-
- name: Configure & Build
run: |
make qemu_x86_64_defconfig
make
- name: Prepare Artifact
run: |
cd output
mv images br2-finit-demo
ln -s br2-finit-demo images
tar chfz br2-finit-demo.tgz br2-finit-demo
- uses: actions/upload-artifact@v4
with:
path: output/br2-finit-demo.tgz
release:
if: ${{github.repository_owner == 'troglobit' && github.ref_name == 'main'}}
name: Upload Latest Build
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitName: true
omitBody: true
omitBodyDuringUpdate: true
prerelease: true
tag: "latest"
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "artifact/*"
- name: Summary
run: |
cat <<EOF >> $GITHUB_STEP_SUMMARY
# Latest Build Complete! :rocket:
For the public download links of these build artifacts, please see:
<https://github.com/troglobit/br2-finit-demo/releases/tag/latest>
EOF