diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b006a29643f3..690907ffae1e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,6 +37,12 @@ jobs: uses: ./.github/actions/setup-qmk - name: Build - id: build run: | qmk compile -kb ${{ matrix.keyboard }} -km ${{ matrix.keymap }} -e SKIP_GIT=1 + + - name: Upload firmware + if: matrix.keymap == 'klayi' + uses: actions/upload-artifact@v4 + with: + name: firmware-${{ matrix.keyboard == 'zsa/moonlander/reva' && 'reva' || 'revb' }} + path: .build/*.bin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 583a3baf89de..5c1597edccfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,17 @@ name: Release firmware on: - push: + workflow_run: + workflows: ["Build firmware"] + types: + - completed branches: - klayi - paths-ignore: - - '**.md' jobs: release-firmware: runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion == 'success' permissions: contents: write @@ -18,7 +20,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - submodules: true - name: Calculate next version id: version @@ -29,17 +30,14 @@ jobs: minor_pattern: "(feat)" version_format: "${major}.${minor}.${patch}" - - name: Setup QMK - uses: ./.github/actions/setup-qmk - - - name: Build firmware - run: | - qmk compile -kb zsa/moonlander -km klayi -e SKIP_GIT=1 - - - name: Prepare release assets - run: | - mkdir -p release - cp .build/*.bin .build/*.hex .build/*.uf2 release/ 2>/dev/null || true + - name: Download firmware artifacts + uses: actions/download-artifact@v4 + with: + path: release + pattern: firmware-* + merge-multiple: true + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Create GitHub Release uses: softprops/action-gh-release@v2