forked from TurBoTse/padavan
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.43 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
name: build
on:
push:
branches:
- "*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target: [K2P, K2P-USB]
toolchain: [mipsel-linux-musl]
steps:
- uses: actions/checkout@main
- uses: hendrikmuhs/ccache-action@main
with:
key: ${{ matrix.target }}-${{ matrix.toolchain }}
- uses: actions/setup-go@main
with:
go-version: '1.23.0'
check-latest: true
cache: false
- name: Prepare environment
run: |
sudo apt-get update && sudo apt-get install -y libtool-bin gperf python3-docutils autopoint gettext ccache
echo "ROOTDIR=${{ github.workspace }}/trunk" >> $GITHUB_ENV
echo "Compilation_time=$(TZ='Asia/Shanghai' date +%Y%m%d)" >> $GITHUB_ENV
- name: Start build firmware
run: |
make ${{ matrix.target }} TOOLCHAIN=${{ matrix.toolchain }}
- uses: actions/upload-artifact@main
with:
name: ${{ matrix.target }}-${{ matrix.toolchain }}
path: trunk/images/*.trx
- uses: ncipollo/release-action@main
with:
commit: ${{ github.sha }}
tag: ${{ env.Compilation_time }}
artifacts: trunk/images/*.trx
allowUpdates: true
omitBodyDuringUpdate: true
- uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 0
keep_minimum_runs: 1