Update GitHub Actions workflow for ZMK firmware build

This commit is contained in:
nguyenhaiac
2025-12-09 20:54:34 +07:00
committed by GitHub
parent fb224a7a6b
commit e2bbbea4c0

View File

@@ -1,5 +1,37 @@
on: [push, pull_request, workflow_dispatch]
name: Build ZMK Firmware
on:
push:
branches:
- master
- sofle_hybrid_rgb_rev5
workflow_dispatch:
permissions:
contents: write
jobs:
build:
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
create_release_master:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
steps:
- name: Download firmware artifacts
uses: actions/download-artifact@v4
with:
name: firmware
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Create Release with firmware
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.date.outputs.date }}-${{ github.sha }}
name: Firmware ${{ steps.date.outputs.date }} - master
body: Build from commit ${{ github.sha }}
files: '*.uf2'