diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0690bfa..1d5ea8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ name: Cross-platform builds on: push: branches: [main] + tags: ['v*'] workflow_dispatch: permissions: @@ -61,3 +62,32 @@ jobs: path: zdxc-${{ matrix.name }}.tar.gz if-no-files-found: error retention-days: 14 + + release: + name: Publish release binaries + needs: build + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-24.04 + timeout-minutes: 10 + permissions: + contents: write + steps: + - name: Download all platform bundles + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + pattern: zdxc-* + path: artifacts + merge-multiple: true + + - name: Create or update GitHub Release + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + TAG: ${{ github.ref_name }} + run: | + if gh release view "$TAG" >/dev/null 2>&1; then + gh release upload "$TAG" artifacts/*.tar.gz --clobber + else + gh release create "$TAG" artifacts/*.tar.gz \ + --verify-tag --title "zdxc $TAG" --generate-notes + fi diff --git a/README.md b/README.md index 1e41e20..c4013b5 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@
+ zdxc.org · Quick start · DXC drop-in · C API ·