Remove web assets and bump version to 0.2.2 #9
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*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-binaries: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| ext: "" | |
| archive: tar.gz | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| ext: ".exe" | |
| archive: zip | |
| - os: macos-14 | |
| target: x86_64-apple-darwin | |
| ext: "" | |
| archive: tar.gz | |
| - os: macos-14 | |
| target: aarch64-apple-darwin | |
| ext: "" | |
| archive: tar.gz | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: cargo build | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: package | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| bin="cipherscope${{ matrix.ext }}" | |
| src="target/${{ matrix.target }}/release/${bin}" | |
| dist="dist" | |
| mkdir -p "${dist}" | |
| if [[ "${{ matrix.archive }}" == "zip" ]]; then | |
| 7z a "${dist}/cipherscope-${{ github.ref_name }}-${{ matrix.target }}.zip" "${src}" | |
| else | |
| tar -czf "${dist}/cipherscope-${{ github.ref_name }}-${{ matrix.target }}.tar.gz" -C "target/${{ matrix.target }}/release" "${bin}" | |
| fi | |
| - name: upload release assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* | |
| publish: | |
| needs: build-binaries | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: cargo test | |
| run: cargo test | |
| - name: cargo publish | |
| run: cargo publish --allow-dirty | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: GitHub Release | |
| uses: softprops/action-gh-release@v2 |