| 1 | name: Build and release |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | tags: |
| 6 | - 'v*' |
| 7 | |
| 8 | jobs: |
| 9 | build-windows: |
| 10 | uses: ./.github/workflows/workflow-build-windows.yaml |
| 11 | build-macos: |
| 12 | uses: ./.github/workflows/workflow-build-macos.yaml |
| 13 | build-ubuntu: |
| 14 | uses: ./.github/workflows/workflow-build-ubuntu.yaml |
| 15 | release: |
| 16 | name: Release packages automatically when pushed a v* version tag |
| 17 | needs: [build-windows, build-macos, build-ubuntu] |
| 18 | runs-on: ubuntu-latest |
| 19 | env: |
| 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 21 | steps: |
| 22 | - name: Download artifacts |
| 23 | uses: actions/download-artifact@v3 |
| 24 | - name: Create info file |
| 25 | run: | |
| 26 | echo "ref: ${GITHUB_REF}" > info.txt |
| 27 | echo "commit: ${GITHUB_SHA}" >> info.txt |
| 28 | echo "build: $(date +"%Y-%m-%dT%H:%M:%SZ")" >> info.txt |
| 29 | - name: Publish release builds |
| 30 | uses: ncipollo/release-action@v1 |
| 31 | with: |
| 32 | artifacts: info.txt, ubuntu/openmsx-debugger-ubuntu-gh.tbz, macos/openmsx-debugger-macos-gh.tbz, mingw32/openmsx-debugger-mingw32-gh.zip |
| 33 | body: "Build number ${{ github.run_number }}\n${{ github.event.head_commit.message }}" |
| 34 | token: ${{ secrets.GITHUB_TOKEN }} |
| 35 | makeLatest: true |
| 36 | prerelease: true |
| 37 | allowUpdates: true |
| 38 | generateReleaseNotes: true |
| 39 | updateOnlyUnreleased: true |