Merge branch 'TurBoTse:main' into main2 #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |