Skip to content

wing: sync with upstream #457

wing: sync with upstream

wing: sync with upstream #457

Workflow file for this run

name: build
on:
push:
branches:
- "*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
target: [K2P, K2P-NANO, K2P-USB]
toolchain: [mipsel-linux-musl]
steps:
- uses: actions/checkout@v3
- uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.target }}-${{ matrix.toolchain }}
- uses: actions/setup-go@v4
with:
go-version: '1.20'
check-latest: true
cache: false
- uses: actions/setup-node@v3
with:
node-version: 18
check-latest: true
- name: Prepare
run: |
sudo apt update
sudo apt install libtool-bin gperf python3-docutils autopoint gettext ccache
- name: Build
run: |
make ${{ matrix.target }} TOOLCHAIN=${{ matrix.toolchain }}
if [ "${{ matrix.target }}" = "K2P-NANO" ]; then
image=$(ls trunk/images/*.trx)
mv $image $(echo $image | sed 's/K2P/K2P-NANO/')
fi
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.toolchain }}
path: trunk/images/*.trx
publish:
needs: [build]
runs-on: ubuntu-22.04
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- name: Set Tag Name
run: echo "TAG_ANME=$(date +%Y%m%d)" >> $GITHUB_ENV
- uses: rickstaa/action-create-tag@v1
with:
tag: ${{ env.TAG_ANME }}
force_push_tag: true
- uses: ncipollo/release-action@v1
with:
commit: ${{ github.sha }}
tag: ${{ env.TAG_ANME }}
artifacts: "mipsel-linux-musl/*.trx"
allowUpdates: true