chore: release v1.5.1 (#98) #15
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 | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - v[0-9]+.* | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version (without leading v)" | |
| required: true | |
| type: string | |
| env: | |
| CARGO_TERM_COLOR: always | |
| GITHUB_TOKEN: ${{ secrets.FNOX_GH_TOKEN }} | |
| jobs: | |
| build-binaries: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| build-tool: cargo | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| build-tool: cargo | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| build-tool: cross | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| build-tool: cross | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| build-tool: cargo | |
| - target: aarch64-pc-windows-msvc | |
| os: windows-latest | |
| build-tool: cargo | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.FNOX_GH_TOKEN }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: rust-${{ matrix.target }} | |
| - if: matrix.os == 'macos-latest' | |
| uses: apple-actions/import-codesign-certs@v3 | |
| with: | |
| p12-file-base64: ${{ secrets.CERTIFICATES_P12 }} | |
| p12-password: ${{ secrets.CERTIFICATES_P12_PASS }} | |
| - uses: taiki-e/upload-rust-binary-action@v1 | |
| with: | |
| bin: fnox | |
| target: ${{ matrix.target }} | |
| build-tool: ${{ matrix.build-tool }} | |
| token: ${{ secrets.FNOX_GH_TOKEN }} | |
| codesign: "Developer ID Application: Jeffrey Dickey (4993Y37DX6)" | |
| codesign_prefix: dev.jdx. | |
| dry-run: true # Always dry-run to just build without uploading | |
| - name: Upload binary artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: binary-${{ matrix.target }} | |
| path: | | |
| fnox-*.tar.gz | |
| fnox-*.tar.xz | |
| fnox-*.zip | |
| retention-days: 1 | |
| create-release: | |
| needs: [build-binaries] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.FNOX_GH_TOKEN }} | |
| - uses: jdx/mise-action@v2 | |
| with: | |
| experimental: true | |
| - run: mise trust --all | |
| - name: Generate release notes | |
| run: git cliff --latest > release-notes.md && cat release-notes.md | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare release assets | |
| run: | | |
| mkdir -p release-assets | |
| # Move all binary artifacts to release-assets | |
| find artifacts/binary-* -type f \( -name "*.tar.gz" -o -name "*.tar.xz" -o -name "*.zip" \) -exec mv {} release-assets/ \; | |
| ls -la release-assets/ | |
| - name: Create release with all assets | |
| run: | | |
| TAG_NAME="${{ github.ref_name }}" | |
| if [ -z "$TAG_NAME" ]; then | |
| TAG_NAME="v${{ inputs.version }}" | |
| fi | |
| gh release create "$TAG_NAME" \ | |
| --title "$TAG_NAME" \ | |
| --notes-file release-notes.md \ | |
| release-assets/* |