Skip to content

Merge pull request #1 from Saitamasans/fix/v0.1.1-safety-correctness #5

Merge pull request #1 from Saitamasans/fix/v0.1.1-safety-correctness

Merge pull request #1 from Saitamasans/fix/v0.1.1-safety-correctness #5

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
tag:
description: Existing v0.1.1 tag to build
required: true
type: string
push:
tags: ["v*"]
permissions:
contents: read
jobs:
source-assets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref_name }}
fetch-depth: 0
- uses: actions/setup-python@v5
with: {python-version: "3.11", cache: pip}
- name: Verify checkout equals release tag
env:
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
run: test "$(git rev-parse HEAD)" = "$(git rev-list -n 1 "$RELEASE_TAG")"
- run: python -m pip install --require-hashes -r requirements.lock
- run: python -m pip install --no-deps --no-build-isolation .
- run: ruff format --check .
- run: ruff check .
- run: python -m pytest tests/unit -q
- run: python scripts/validate_schemas.py
- run: python scripts/validate_skill.py .
- run: python scripts/security_scan.py .
- run: python -m build --no-isolation
- run: python scripts/generate_supply_chain_docs.py
- name: Stage flat source assets
run: |
mkdir -p build/release-assets
cp dist/multi_api_test_executor-*.whl build/release-assets/
cp dist/multi_api_test_executor-*.tar.gz build/release-assets/
cp build/release/sbom.cdx.json build/release-assets/
cp build/release/THIRD_PARTY_LICENSES.txt build/release-assets/
- uses: actions/upload-artifact@v4
with:
name: release-source-assets
path: build/release-assets/*
native-bundles:
strategy:
fail-fast: false
matrix:
include:
- {os: windows-latest, platform: windows-x64}
- {os: ubuntu-latest, platform: linux-x64}
- {os: macos-15-intel, platform: macos-x64}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref_name }}
fetch-depth: 0
- uses: actions/setup-python@v5
with: {python-version: "3.11", cache: pip}
- name: Verify checkout equals release tag
shell: bash
env:
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
run: test "$(git rev-parse HEAD)" = "$(git rev-list -n 1 "$RELEASE_TAG")"
- run: python -m pip install --require-hashes -r requirements.lock
- run: python -m pip install --no-deps --no-build-isolation .
- run: python -m build --no-isolation
- run: python -m pip download --require-hashes --dest wheelhouse -r requirements-runtime.lock
- run: python scripts/build_binary.py
- run: python scripts/generate_supply_chain_docs.py
- run: python scripts/build_skill_bundle.py --platform ${{ matrix.platform }}
- run: python scripts/verify_checksums.py build/release/SHA256SUMS.txt build/release
- if: runner.os == 'Windows'
run: powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/ci_bundle_smoke.ps1 -BundleZip build/release/multi-api-test-executor-0.1.1-${{ matrix.platform }}.zip
- if: runner.os != 'Windows'
run: sh scripts/ci_bundle_smoke.sh build/release/multi-api-test-executor-0.1.1-${{ matrix.platform }}.zip
- run: python scripts/package_release_asset.py --bundle build/release/multi-api-test-executor-0.1.1-${{ matrix.platform }}.zip --platform ${{ matrix.platform }} --tag ${{ inputs.tag || github.ref_name }}
- uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.platform }}
path: build/release-assets/*
publish:
if: startsWith(github.ref, 'refs/tags/')
needs: [source-assets, native-bundles]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref_name }}
- uses: actions/download-artifact@v4
with: {path: artifacts, merge-multiple: true}
- run: python scripts/validate_release_assets.py artifacts --tag ${{ inputs.tag || github.ref_name }}
- name: Write aggregate checksums
run: |
python - <<'PY'
from hashlib import sha256
from pathlib import Path
root = Path("artifacts")
files = sorted(path for path in root.iterdir() if path.is_file())
(root / "SHA256SUMS.txt").write_text(
"\n".join(f"{sha256(path.read_bytes()).hexdigest()} {path.name}" for path in files) + "\n",
encoding="utf-8",
)
PY
- uses: softprops/action-gh-release@v2
with:
files: artifacts/*
body_path: docs/release-notes-v0.1.1.md
prerelease: ${{ contains(inputs.tag || github.ref_name, '-') }}
fail_on_unmatched_files: true