Merge pull request #29 from SkyPierIO/feat/doh-upstream #5
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 | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: taiki-e/create-gh-release-action@v1 | |
| build: | |
| needs: create-release | |
| name: ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: x86_64-apple-darwin | |
| os: macos-13 | |
| - target: aarch64-apple-darwin | |
| os: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Build and upload binary | |
| uses: taiki-e/upload-rust-binary-action@v1 | |
| with: | |
| bin: skypier-blackhole | |
| target: ${{ matrix.target }} | |
| archive: $bin-$target | |
| checksum: sha256 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| build-deb: | |
| needs: create-release | |
| name: deb (amd64) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-deb | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-deb | |
| - name: Build .deb package | |
| run: cargo deb --output target/debian/skypier-blackhole_amd64.deb | |
| - name: Generate checksum | |
| working-directory: target/debian | |
| run: sha256sum skypier-blackhole_amd64.deb > skypier-blackhole_amd64.deb.sha256 | |
| - name: Upload .deb to release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload "$GITHUB_REF_NAME" \ | |
| target/debian/skypier-blackhole_amd64.deb \ | |
| target/debian/skypier-blackhole_amd64.deb.sha256 |