fix release workflow (#49) #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release to GitHub | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+-?**' | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.target }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: aarch64-apple-darwin | |
| os: macos-15 | |
| - target: aarch64-unknown-linux-musl | |
| os: ubuntu-24.04-arm | |
| - target: x86_64-unknown-linux-musl | |
| os: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install musl toolchain | |
| if: contains(matrix.target, 'musl') | |
| run: sudo apt-get update && sudo apt-get install -y musl-tools | |
| - name: Add target | |
| run: rustup target add ${{ matrix.target }} | |
| - name: Build | |
| run: cargo build --release --workspace --target ${{ matrix.target }} | |
| - name: Package binaries | |
| run: | | |
| mkdir -p dist | |
| for bin in composable waspect composable-http-gateway; do | |
| cp target/${{ matrix.target }}/release/$bin dist/${bin}-${{ matrix.target }} | |
| done | |
| - name: Upload binaries | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: binaries-${{ matrix.target }} | |
| path: dist/* | |
| retention-days: 7 | |
| release: | |
| name: GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: build | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download all binaries | |
| uses: actions/download-artifact@v8 | |
| with: | |
| pattern: binaries-* | |
| path: ./dist/ | |
| merge-multiple: true | |
| - name: Draft GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| files: dist/* | |
| fail_on_unmatched_files: true | |
| token: ${{ secrets.GITHUB_TOKEN }} |