Update dependencies. #10
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Run tests | |
| run: cargo test | |
| release: | |
| needs: test | |
| name: Release - ${{ matrix.platform.release_for }} | |
| runs-on: ${{ matrix.platform.os }} | |
| strategy: | |
| matrix: | |
| platform: | |
| - release_for: Linux-x86_64 | |
| os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| binary_path: target/x86_64-unknown-linux-gnu/release/anypod | |
| asset_name: anypod-linux-x86_64 | |
| - release_for: Windows-x86_64 | |
| os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| binary_path: target/x86_64-pc-windows-msvc/release/anypod.exe | |
| asset_name: anypod-windows-x86_64.exe | |
| - release_for: macOS-x86_64 | |
| os: macos-latest | |
| target: x86_64-apple-darwin | |
| binary_path: target/x86_64-apple-darwin/release/anypod | |
| asset_name: anypod-macos-x86_64 | |
| - release_for: macOS-aarch64 | |
| os: macos-latest | |
| target: aarch64-apple-darwin | |
| binary_path: target/aarch64-apple-darwin/release/anypod | |
| asset_name: anypod-macos-aarch64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.platform.target }} | |
| - name: Generate SHA256 checksums | |
| shell: bash | |
| if: matrix.platform.os != 'windows-latest' | |
| run: | | |
| shasum -a 256 target/${{ matrix.platform.target }}/release/anypod > ${{ matrix.platform.asset_name }}.sha256 | |
| - name: Generate SHA256 checksums (Windows) | |
| if: matrix.platform.os == 'windows-latest' | |
| shell: pwsh | |
| run: | | |
| $hash = Get-FileHash target/x86_64-pc-windows-msvc/release/anypod.exe -Algorithm SHA256 | |
| $hash.Hash > anypod-windows-x86_64.exe.sha256 | |
| - name: Upload binaries to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ${{ matrix.platform.binary_path }} | |
| asset_name: ${{ matrix.platform.asset_name }} | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| - name: Upload SHA256 checksums | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ${{ matrix.platform.asset_name }}.sha256 | |
| asset_name: ${{ matrix.platform.asset_name }}.sha256 | |
| tag: ${{ github.ref }} | |
| overwrite: true |