diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dfcf245..717a074 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,6 +36,9 @@ jobs: uses: actions/upload-artifact@v4 with: name: testbuild-${{ matrix.env }} - path: firmware/**/*_factory.bin + # Shallow PR checkouts make post_build_merge.py fall back to "dev" + # for its output dir; firmware/ also holds committed historical + # binaries that must not be uploaded. + path: firmware/dev/*_factory.bin if-no-files-found: warn retention-days: 14 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f136452..199c232 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,7 +45,9 @@ jobs: uses: actions/upload-artifact@v4 with: name: firmware-${{ matrix.env }} - path: firmware/**/*.bin + # Only this tag's output dir -- firmware/ also holds the committed + # historical binaries and must not ship with the release. + path: firmware/${{ github.ref_name }}/*.bin if-no-files-found: error release: @@ -58,14 +60,8 @@ jobs: with: path: artifacts merge-multiple: true - - name: Create release with binaries - env: - GH_TOKEN: ${{ github.token }} - run: | - shopt -s globstar - gh release create "${GITHUB_REF_NAME}" \ - --repo "${GITHUB_REPOSITORY}" \ - --title "${GITHUB_REF_NAME}" \ - --prerelease \ - --generate-notes \ - artifacts/**/*.bin + - uses: softprops/action-gh-release@v2 + with: + prerelease: true + generate_release_notes: true + files: artifacts/**/*_factory.bin