name: release on: push: tags: - "v*" env: CARGO_TERM_COLOR: always RUSTFLAGS: "-D warnings" permissions: contents: write id-token: write attestations: write jobs: build-release: name: build-release runs-on: ${{ matrix.os }} strategy: matrix: target: - x86_64-unknown-linux-musl - aarch64-unknown-linux-musl - x86_64-apple-darwin - aarch64-apple-darwin - x86_64-pc-windows-msvc toolchain: [ stable ] include: - os: ubuntu-latest target: x86_64-unknown-linux-musl expected-binary-architecture: x86-64 cargo-tool: cross - os: ubuntu-latest target: aarch64-unknown-linux-musl expected-binary-architecture: aarch64 cargo-tool: cross # macos>=14 runs exclusively on aarch64 and will thus fail to execute properly for x64 - os: macos-13 target: x86_64-apple-darwin expected-binary-architecture: x86_64 cargo-tool: cargo - os: macos-latest target: aarch64-apple-darwin expected-binary-architecture: arm64 cargo-tool: cargo - os: windows-latest target: x86_64-pc-windows-msvc expected-binary-architecture: x86-64 cargo-tool: cargo - os: ubuntu-latest target: wasm32-unknown-unknown cargo-tool: wasm-pack steps: - name: Checkout repository uses: actions/checkout@v4 - name: "Build Archive" id: build uses: "./.github/actions/build-release" with: version: ${{ github.ref_name }} toolchain: ${{ matrix.toolchain }} target: ${{ matrix.target }} cargo-tool: ${{ matrix.cargo-tool }} expected-binary-architecture: ${{ matrix.expected-binary-architecture }} - name: Upload release archive id: release # https://github.com/softprops/action-gh-release/issues/445 # uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@0bd7e8b279c9b5b36661d552472fbbfe671fe26e with: draft: true prerelease: ${{ contains(github.ref_name, '-rc.') }} fail_on_unmatched_files: true files: "${{ steps.build.outputs.files }}" generate_release_notes: true tag_name: ${{ github.ref_name }}