RUST-REF-005: extract download source registry tests #47
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 | ||
|
Check failure on line 1 in .github/workflows/release.yml
|
||
| # Build and publish the unsigned Windows x64 release artifact on a rust-v* tag. | ||
| # The tag is created only after the soak-evidence review and an explicit operator | ||
| # go (see docs/active/items/RUST-FEAT-033.md). | ||
| on: | ||
| push: | ||
| tags: | ||
| - "rust-v*" | ||
| workflow_dispatch: | ||
| inputs: | ||
| ref: | ||
| description: "Tag or ref to build (rust-vX.Y.Z[-pre.N])" | ||
| required: true | ||
| permissions: | ||
| contents: write | ||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| CARGO_TARGET_DIR: ${{ runner.temp }}/emulebb-rust-target | ||
| RELEASE_OUT_DIR: ${{ runner.temp }}/emulebb-rust-dist | ||
| MINIUPNP_REF: bced81fb0b73ae78c9b911c89e881fbc6d4a5c7c | ||
| jobs: | ||
| windows-x64: | ||
| name: emulebb-rust-windows-x64 | ||
| runs-on: windows-latest | ||
| steps: | ||
| - name: Checkout emulebb-rust | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| ref: ${{ github.event.inputs.ref || github.ref }} | ||
| - name: Checkout emulebb-miniupnp (native C source) | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| repository: emulebb/emulebb-miniupnp | ||
| ref: ${{ env.MINIUPNP_REF }} | ||
| path: .ci/emulebb-miniupnp | ||
| - name: Install pinned Rust | ||
| uses: dtolnay/rust-toolchain@1a3a6d54512beeaffd394f8d516ca16f2c506a20 # 1.97.0 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: "3.12" | ||
| # Guard: the test-only egress-audit leak-test feature must never reach the | ||
| # release binary. The policy checker asserts it is not a default feature and | ||
| # not referenced by the daemon crate. | ||
| - name: Assert release build excludes test-only features | ||
| run: python tools/check_rust_client_policy.py | ||
| - name: Build release (default features only) | ||
| env: | ||
| MINIUPNP_ROOT: ${{ github.workspace }}/.ci/emulebb-miniupnp | ||
| run: cargo build --release --locked -p emulebb-daemon | ||
| - name: Package unsigned Windows x64 zip | ||
| shell: bash | ||
| run: >- | ||
| python tools/package_release_zip.py | ||
| --target-dir "$CARGO_TARGET_DIR/release" | ||
| --out "$RELEASE_OUT_DIR" | ||
| - name: Publish to the GitHub release | ||
| uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 | ||
| with: | ||
| files: | | ||
| ${{ env.RELEASE_OUT_DIR }}/*.zip | ||
| ${{ env.RELEASE_OUT_DIR }}/SHA256SUMS | ||
| fail_on_unmatched_files: true | ||