Bump @sigstore/core from 3.1.0 to 3.2.1 in /tests/runner-fixtures/npm-tap #98
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| rust_core: ${{ steps.filter.outputs.rust_core }} | |
| release_relevant: ${{ steps.release_relevant.outputs.value }} | |
| integration_rust_nextest: ${{ steps.filter.outputs.integration_rust_nextest }} | |
| integration_go: ${{ steps.filter.outputs.integration_go }} | |
| integration_npm_tap: ${{ steps.filter.outputs.integration_npm_tap }} | |
| integration_bun: ${{ steps.filter.outputs.integration_bun }} | |
| integration_jest_json: ${{ steps.filter.outputs.integration_jest_json }} | |
| integration_vitest_json: ${{ steps.filter.outputs.integration_vitest_json }} | |
| integration_python_pytest: ${{ steps.filter.outputs.integration_python_pytest }} | |
| integration_python_unittest: ${{ steps.filter.outputs.integration_python_unittest }} | |
| integration_junit_run: ${{ steps.filter.outputs.integration_junit_run }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Detect changed paths | |
| id: filter | |
| uses: dorny/paths-filter@v4 | |
| with: | |
| filters: | | |
| rust_core: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - '.github/workflows/**' | |
| - 'scripts/**' | |
| - 'README.md' | |
| - 'CONTRIBUTING.md' | |
| - 'docs/**' | |
| integration_rust_nextest: | |
| - 'src/**' | |
| - 'scripts/verify-nextest-integration.sh' | |
| - 'tests/runner-fixtures/rust-nextest/**' | |
| - '.github/workflows/**' | |
| integration_go: | |
| - 'src/**' | |
| - 'scripts/verify-go-integration.sh' | |
| - 'tests/runner-fixtures/go-sample/**' | |
| - '.github/workflows/**' | |
| integration_npm_tap: | |
| - 'src/**' | |
| - 'scripts/verify-npm-tap-integration.sh' | |
| - 'tests/runner-fixtures/npm-tap/**' | |
| - '.github/workflows/**' | |
| integration_bun: | |
| - 'src/**' | |
| - 'scripts/verify-bun-integration.sh' | |
| - 'tests/runner-fixtures/bun-default/**' | |
| - '.github/workflows/**' | |
| integration_jest_json: | |
| - 'src/**' | |
| - 'scripts/verify-jest-integration.sh' | |
| - 'tests/runner-fixtures/jest-json/**' | |
| - '.github/workflows/**' | |
| integration_vitest_json: | |
| - 'src/**' | |
| - 'scripts/verify-vitest-integration.sh' | |
| - 'tests/runner-fixtures/vitest-json/**' | |
| - '.github/workflows/**' | |
| integration_python_pytest: | |
| - 'src/**' | |
| - 'scripts/verify-pytest-integration.sh' | |
| - 'tests/runner-fixtures/python-pytest/**' | |
| - '.github/workflows/**' | |
| integration_python_unittest: | |
| - 'src/**' | |
| - 'scripts/verify-unittest-integration.sh' | |
| - 'tests/runner-fixtures/python-unittest/**' | |
| - '.github/workflows/**' | |
| integration_junit_run: | |
| - 'src/**' | |
| - 'scripts/verify-junit-run-integration.sh' | |
| - 'tests/**' | |
| - '.github/workflows/**' | |
| - name: Determine release-relevant changes | |
| id: release_relevant | |
| env: | |
| INTEGRATION_RUST_NEXTEST: ${{ steps.filter.outputs.integration_rust_nextest }} | |
| INTEGRATION_GO: ${{ steps.filter.outputs.integration_go }} | |
| INTEGRATION_NPM_TAP: ${{ steps.filter.outputs.integration_npm_tap }} | |
| INTEGRATION_BUN: ${{ steps.filter.outputs.integration_bun }} | |
| INTEGRATION_JEST_JSON: ${{ steps.filter.outputs.integration_jest_json }} | |
| INTEGRATION_VITEST_JSON: ${{ steps.filter.outputs.integration_vitest_json }} | |
| INTEGRATION_PYTHON_PYTEST: ${{ steps.filter.outputs.integration_python_pytest }} | |
| INTEGRATION_PYTHON_UNITTEST: ${{ steps.filter.outputs.integration_python_unittest }} | |
| INTEGRATION_JUNIT_RUN: ${{ steps.filter.outputs.integration_junit_run }} | |
| run: | | |
| value=false | |
| for flag in \ | |
| "$INTEGRATION_RUST_NEXTEST" \ | |
| "$INTEGRATION_GO" \ | |
| "$INTEGRATION_NPM_TAP" \ | |
| "$INTEGRATION_BUN" \ | |
| "$INTEGRATION_JEST_JSON" \ | |
| "$INTEGRATION_VITEST_JSON" \ | |
| "$INTEGRATION_PYTHON_PYTEST" \ | |
| "$INTEGRATION_PYTHON_UNITTEST" \ | |
| "$INTEGRATION_JUNIT_RUN"; do | |
| if [[ "$flag" == "true" ]]; then | |
| value=true | |
| break | |
| fi | |
| done | |
| echo "value=$value" >> "$GITHUB_OUTPUT" | |
| build-tapcue-debug: | |
| needs: changes | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.release_relevant == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build tapcue debug binary | |
| run: cargo build --locked | |
| - name: Upload tapcue debug binary | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tapcue-debug-bin | |
| path: target/debug/tapcue | |
| rust-matrix: | |
| needs: changes | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.rust_core == 'true' | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Format check | |
| run: cargo fmt --all --check | |
| - name: Cargo check (locked) | |
| run: cargo check --all-targets --all-features --locked | |
| - name: Clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Tests | |
| run: cargo test --all-features --locked | |
| rust-toolchain-linux: | |
| needs: changes | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.rust_core == 'true' | |
| runs-on: ubuntu-latest | |
| continue-on-error: ${{ matrix.allow_failure }} | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - toolchain: 1.86.0 | |
| allow_failure: false | |
| - toolchain: stable | |
| allow_failure: false | |
| - toolchain: nightly | |
| allow_failure: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust (${{ matrix.toolchain }}) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Cargo check | |
| run: cargo check --all-targets --locked | |
| - name: Cargo test | |
| run: cargo test --all-features --locked | |
| test-linux-extra: | |
| needs: [changes, rust-matrix] | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.rust_core == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Stream format fixtures | |
| run: cargo test --test stream_formats --locked | |
| - name: Build docs | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| run: cargo doc --no-deps --locked | |
| - name: Validate man page | |
| run: man -l docs/man/tapcue.1 >/dev/null | |
| - name: Validate TLDR page | |
| run: | | |
| python3 - <<'PY' | |
| from pathlib import Path | |
| page = Path("docs/tldr/tapcue.md") | |
| lines = page.read_text(encoding="utf-8").splitlines() | |
| assert lines and lines[0].startswith("# "), "TLDR page must start with a title" | |
| assert any(line.startswith("> ") for line in lines), "TLDR page must include a description" | |
| assert any(line.startswith("`") and line.endswith("`") for line in lines), "TLDR page must include at least one command example" | |
| PY | |
| - name: Shell script lint | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y shellcheck | |
| shellcheck scripts/*.sh | |
| - name: Validate docs script references | |
| run: ./scripts/check-doc-links.sh | |
| - name: Dependency audit | |
| uses: rustsec/audit-check@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| integration-rust-nextest: | |
| needs: [changes, build-tapcue-debug] | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.integration_rust_nextest == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - name: Download tapcue debug binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: tapcue-debug-bin | |
| path: bin | |
| - name: Ensure tapcue binary is executable | |
| run: chmod +x bin/tapcue | |
| - name: Verify rust nextest integration | |
| env: | |
| TAPCUE_BIN: ${{ github.workspace }}/bin/tapcue | |
| run: ./scripts/verify-nextest-integration.sh | |
| integration-go: | |
| needs: [changes, build-tapcue-debug] | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.integration_go == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: stable | |
| - name: Download tapcue debug binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: tapcue-debug-bin | |
| path: bin | |
| - name: Ensure tapcue binary is executable | |
| run: chmod +x bin/tapcue | |
| - name: Verify go integration | |
| env: | |
| TAPCUE_BIN: ${{ github.workspace }}/bin/tapcue | |
| run: ./scripts/verify-go-integration.sh | |
| integration-npm-tap: | |
| needs: [changes, build-tapcue-debug] | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.integration_npm_tap == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: tests/runner-fixtures/npm-tap/package-lock.json | |
| - name: Download tapcue debug binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: tapcue-debug-bin | |
| path: bin | |
| - name: Ensure tapcue binary is executable | |
| run: chmod +x bin/tapcue | |
| - name: Verify npm TAP integration | |
| env: | |
| TAPCUE_BIN: ${{ github.workspace }}/bin/tapcue | |
| run: ./scripts/verify-npm-tap-integration.sh | |
| integration-bun: | |
| needs: [changes, build-tapcue-debug] | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.integration_bun == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Download tapcue debug binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: tapcue-debug-bin | |
| path: bin | |
| - name: Ensure tapcue binary is executable | |
| run: chmod +x bin/tapcue | |
| - name: Verify Bun integration | |
| env: | |
| TAPCUE_BIN: ${{ github.workspace }}/bin/tapcue | |
| run: ./scripts/verify-bun-integration.sh | |
| integration-jest-json: | |
| needs: [changes, build-tapcue-debug] | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.integration_jest_json == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: tests/runner-fixtures/jest-json/package-lock.json | |
| - name: Download tapcue debug binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: tapcue-debug-bin | |
| path: bin | |
| - name: Ensure tapcue binary is executable | |
| run: chmod +x bin/tapcue | |
| - name: Verify Jest JSON integration | |
| env: | |
| TAPCUE_BIN: ${{ github.workspace }}/bin/tapcue | |
| run: ./scripts/verify-jest-integration.sh | |
| integration-vitest-json: | |
| needs: [changes, build-tapcue-debug] | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.integration_vitest_json == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: tests/runner-fixtures/vitest-json/package-lock.json | |
| - name: Download tapcue debug binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: tapcue-debug-bin | |
| path: bin | |
| - name: Ensure tapcue binary is executable | |
| run: chmod +x bin/tapcue | |
| - name: Verify Vitest JSON integration | |
| env: | |
| TAPCUE_BIN: ${{ github.workspace }}/bin/tapcue | |
| run: ./scripts/verify-vitest-integration.sh | |
| integration-python-pytest: | |
| needs: [changes, build-tapcue-debug] | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.integration_python_pytest == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Download tapcue debug binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: tapcue-debug-bin | |
| path: bin | |
| - name: Ensure tapcue binary is executable | |
| run: chmod +x bin/tapcue | |
| - name: Verify pytest integration | |
| env: | |
| TAPCUE_BIN: ${{ github.workspace }}/bin/tapcue | |
| run: ./scripts/verify-pytest-integration.sh | |
| integration-python-unittest: | |
| needs: [changes, build-tapcue-debug] | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.integration_python_unittest == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Download tapcue debug binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: tapcue-debug-bin | |
| path: bin | |
| - name: Ensure tapcue binary is executable | |
| run: chmod +x bin/tapcue | |
| - name: Verify unittest integration | |
| env: | |
| TAPCUE_BIN: ${{ github.workspace }}/bin/tapcue | |
| run: ./scripts/verify-unittest-integration.sh | |
| integration-junit-run: | |
| needs: [changes, build-tapcue-debug] | |
| if: github.event_name != 'pull_request' || needs.changes.outputs.integration_junit_run == 'true' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Download tapcue debug binary | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: tapcue-debug-bin | |
| path: bin | |
| - name: Ensure tapcue binary is executable | |
| run: chmod +x bin/tapcue | |
| - name: Verify JUnit run integration | |
| env: | |
| TAPCUE_BIN: ${{ github.workspace }}/bin/tapcue | |
| run: ./scripts/verify-junit-run-integration.sh | |
| build-release-prerelease: | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/main') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| needs: | |
| - rust-matrix | |
| - rust-toolchain-linux | |
| - test-linux-extra | |
| - integration-rust-nextest | |
| - integration-go | |
| - integration-npm-tap | |
| - integration-bun | |
| - integration-jest-json | |
| - integration-vitest-json | |
| - integration-python-pytest | |
| - integration-python-unittest | |
| - integration-junit-run | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build release binary | |
| run: cargo build --release --locked --target x86_64-unknown-linux-gnu | |
| - name: Release smoke test | |
| run: | | |
| target/x86_64-unknown-linux-gnu/release/tapcue --help >/dev/null | |
| printf 'TAP version 14\n1..1\nok 1 - release-smoke\n' | target/x86_64-unknown-linux-gnu/release/tapcue --no-notify --format tap | |
| set +e | |
| printf '{"Action":"pass","Package":"pkg","Test":"ok"}\n{"Action":"fail","Package":"pkg","Test":"bad"}\n' | target/x86_64-unknown-linux-gnu/release/tapcue --no-notify --format json | |
| status=$? | |
| set -e | |
| if [[ $status -ne 1 ]]; then | |
| echo "expected release smoke JSON failure exit code 1, got $status" | |
| exit 1 | |
| fi | |
| - name: Package release artifact | |
| id: package | |
| run: | | |
| mkdir -p dist/package/bin | |
| mkdir -p dist/package/share/man/man1 | |
| mkdir -p dist/package/share/tldr-pages/pages/common | |
| cp target/x86_64-unknown-linux-gnu/release/tapcue dist/package/bin/tapcue | |
| cp docs/man/tapcue.1 dist/package/share/man/man1/tapcue.1 | |
| cp docs/tldr/tapcue.md dist/package/share/tldr-pages/pages/common/tapcue.md | |
| artifact_name="tapcue-unreleased-x86_64-unknown-linux-gnu.tar.gz" | |
| tar -C dist/package -czf "dist/${artifact_name}" . | |
| sha256sum "dist/${artifact_name}" > "dist/${artifact_name}.sha256" | |
| echo "artifact_path=dist/${artifact_name}" >> "$GITHUB_OUTPUT" | |
| echo "artifact_sha_path=dist/${artifact_name}.sha256" >> "$GITHUB_OUTPUT" | |
| - name: Publish prerelease from main | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: unreleased | |
| name: tapcue unreleased | |
| prerelease: true | |
| make_latest: false | |
| overwrite_files: true | |
| files: | | |
| ${{ steps.package.outputs.artifact_path }} | |
| ${{ steps.package.outputs.artifact_sha_path }} | |
| build-release-tag-artifacts: | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| rust_target: x86_64-unknown-linux-gnu | |
| binary_name: tapcue | |
| archive_ext: tar.gz | |
| - os: macos-14 | |
| rust_target: aarch64-apple-darwin | |
| binary_name: tapcue | |
| archive_ext: tar.gz | |
| - os: windows-latest | |
| rust_target: x86_64-pc-windows-msvc | |
| binary_name: tapcue.exe | |
| archive_ext: zip | |
| needs: | |
| - rust-matrix | |
| - rust-toolchain-linux | |
| - test-linux-extra | |
| - integration-rust-nextest | |
| - integration-go | |
| - integration-npm-tap | |
| - integration-bun | |
| - integration-jest-json | |
| - integration-vitest-json | |
| - integration-python-pytest | |
| - integration-python-unittest | |
| - integration-junit-run | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Add Rust target | |
| run: rustup target add ${{ matrix.rust_target }} | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build release binary | |
| run: cargo build --release --locked --target ${{ matrix.rust_target }} | |
| - name: Release smoke test (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| binary_path="target/${{ matrix.rust_target }}/release/${{ matrix.binary_name }}" | |
| "$binary_path" --help >/dev/null | |
| printf 'TAP version 14\n1..1\nok 1 - release-smoke\n' | "$binary_path" --no-notify --format tap | |
| set +e | |
| printf '{"Action":"pass","Package":"pkg","Test":"ok"}\n{"Action":"fail","Package":"pkg","Test":"bad"}\n' | "$binary_path" --no-notify --format json | |
| status=$? | |
| set -e | |
| if [[ $status -ne 1 ]]; then | |
| echo "expected release smoke JSON failure exit code 1, got $status" | |
| exit 1 | |
| fi | |
| - name: Release smoke test (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $binaryPath = "target/${{ matrix.rust_target }}/release/${{ matrix.binary_name }}" | |
| & $binaryPath --help | Out-Null | |
| Set-Content -Path smoke.tap -Value "TAP version 14`n1..1`nok 1 - release-smoke`n" -Encoding utf8 | |
| Get-Content -Path smoke.tap -Raw | & $binaryPath --no-notify --format tap | Out-Null | |
| Set-Content -Path smoke.json -Value "{""Action"":""pass"",""Package"":""pkg"",""Test"":""ok""}`n{""Action"":""fail"",""Package"":""pkg"",""Test"":""bad""}`n" -Encoding utf8 | |
| Get-Content -Path smoke.json -Raw | & $binaryPath --no-notify --format json | |
| if ($LASTEXITCODE -ne 1) { | |
| throw "expected release smoke JSON failure exit code 1, got $LASTEXITCODE" | |
| } | |
| - name: Package release artifact (Unix) | |
| if: runner.os != 'Windows' | |
| id: package_unix | |
| run: | | |
| mkdir -p dist/package/bin | |
| mkdir -p dist/package/share/man/man1 | |
| mkdir -p dist/package/share/tldr-pages/pages/common | |
| cp "target/${{ matrix.rust_target }}/release/${{ matrix.binary_name }}" dist/package/bin/${{ matrix.binary_name }} | |
| cp docs/man/tapcue.1 dist/package/share/man/man1/tapcue.1 | |
| cp docs/tldr/tapcue.md dist/package/share/tldr-pages/pages/common/tapcue.md | |
| artifact_name="tapcue-${GITHUB_REF_NAME}-${{ matrix.rust_target }}.${{ matrix.archive_ext }}" | |
| tar -C dist/package -czf "dist/${artifact_name}" . | |
| echo "artifact_name=${artifact_name}" >> "$GITHUB_OUTPUT" | |
| - name: Package release artifact (Windows) | |
| if: runner.os == 'Windows' | |
| id: package_windows | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path "dist/package/bin" | Out-Null | |
| New-Item -ItemType Directory -Force -Path "dist/package/share/man/man1" | Out-Null | |
| New-Item -ItemType Directory -Force -Path "dist/package/share/tldr-pages/pages/common" | Out-Null | |
| Copy-Item "target/${{ matrix.rust_target }}/release/${{ matrix.binary_name }}" "dist/package/bin/${{ matrix.binary_name }}" | |
| Copy-Item "docs/man/tapcue.1" "dist/package/share/man/man1/tapcue.1" | |
| Copy-Item "docs/tldr/tapcue.md" "dist/package/share/tldr-pages/pages/common/tapcue.md" | |
| $artifactName = "tapcue-$env:GITHUB_REF_NAME-${{ matrix.rust_target }}.${{ matrix.archive_ext }}" | |
| Compress-Archive -Path "dist/package/*" -DestinationPath "dist/$artifactName" -Force | |
| "artifact_name=$artifactName" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | |
| - name: Upload release artifact (Unix) | |
| if: runner.os != 'Windows' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: release-archive-${{ matrix.rust_target }} | |
| path: dist/${{ steps.package_unix.outputs.artifact_name }} | |
| - name: Upload release artifact (Windows) | |
| if: runner.os == 'Windows' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: release-archive-${{ matrix.rust_target }} | |
| path: dist/${{ steps.package_windows.outputs.artifact_name }} | |
| publish-tagged-release: | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| needs: | |
| - build-release-tag-artifacts | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download platform release artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| pattern: release-archive-* | |
| merge-multiple: true | |
| path: dist | |
| - name: Generate checksums | |
| run: | | |
| shopt -s nullglob | |
| files=(dist/*) | |
| if [[ ${#files[@]} -eq 0 ]]; then | |
| echo "No release artifacts were downloaded." | |
| exit 1 | |
| fi | |
| for file in "${files[@]}"; do | |
| sha256sum "$file" > "$file.sha256" | |
| done | |
| - name: Publish tagged release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| prerelease: false | |
| files: | | |
| dist/* |