Skip to content

build

build #74

Workflow file for this run

name: build
on:
workflow_dispatch:
inputs:
production:
description:
default: "MI-R4A"
required: false
release:
description:
default: 'yes'
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hendrikmuhs/[email protected]
with:
key: "${{ github.event.inputs.production }}"
- uses: actions/setup-go@v5
with:
go-version: '1.21'
check-latest: true
cache: false
- uses: actions/setup-node@v3
with:
node-version: 18
check-latest: true
- name: Prepare environment
run: |
sudo apt update
sudo apt install libtool-bin gperf python3-docutils autopoint gettext ccache
- name: Build firmware
run: |
make "${{ github.event.inputs.production }}"
echo "TAG_ANME=$(TZ='Asia/Shanghai' date +%Y.%m.%d-%H%M)" >> $GITHUB_ENV
- name : Upload images to Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.inputs.production }}-${{ env.TAG_ANME }}
path: trunk/images/*.trx
- name: Upload images to Releases
uses: ncipollo/release-action@v1
if: ${{ github.event.inputs.release == 'yes' }}
with:
commit: ${{ github.sha }}
tag: ${{ env.TAG_ANME }}
artifacts: trunk/images/*.trx
allowUpdates: true