-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (77 loc) · 3.21 KB
/
Copy pathrelease.yml
File metadata and controls
80 lines (77 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# release.yml — first public release-prep draft artifact workflow.
#
# This workflow creates CI draft artifacts only. It does not create GitHub Releases,
# publish PyPI distributions, publish npm packages, or approve launch wording.
name: release
on:
workflow_dispatch:
push:
tags: ["v*"]
jobs:
preflight:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: public surface posture tests
run: python3 .github/scripts/test_public_surface_posture.py
- name: claims gate
run: python3 .github/scripts/claims_gate.py
- name: first public release scope decision tests
run: python3 .github/scripts/test_first_public_release_scope_decision.py
- name: Python public API policy tests
run: python3 .github/scripts/test_python_public_api_policy.py
- name: npm binary package scaffold tests
run: python3 .github/scripts/test_npm_binary_package_scaffold.py
- name: PDFium manual setup contract tests
run: python3 .github/scripts/test_pdfium_manual_setup_contract.py
cli-draft-artifacts:
needs: preflight
strategy:
fail-fast: false
matrix:
include:
- artifact_target: macos-arm64
os: macos-14
archive_ext: tar.gz
- artifact_target: linux-x64
os: ubuntu-latest
archive_ext: tar.gz
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: rustup show
- name: build CLI
run: cargo build --locked --release -p ethos-cli
- name: assemble draft artifact
shell: bash
run: |
set -euo pipefail
out="target/release-artifacts/ethos-${{ matrix.artifact_target }}"
mkdir -p "$out"
cp target/release/ethos "$out/ethos"
cp LICENSE NOTICE "$out/"
cp docs/pdfium-manual-setup.md "$out/"
tar -C "$(dirname "$out")" -czf "$out.${{ matrix.archive_ext }}" "$(basename "$out")"
shasum -a 256 "$out.${{ matrix.archive_ext }}" > "$out.${{ matrix.archive_ext }}.sha256"
python3 .github/scripts/write_release_artifact_inventory.py \
--artifact "$out.${{ matrix.archive_ext }}" \
--checksum "$out.${{ matrix.archive_ext }}.sha256" \
--target "${{ matrix.artifact_target }}" \
--out "$out.inventory.json"
- name: smoke draft artifact
run: |
python3 .github/scripts/smoke_release_cli_artifact.py \
--artifact-dir "target/release-artifacts/ethos-${{ matrix.artifact_target }}" \
--expected-version "ethos 0.3.0" \
--target "${{ matrix.artifact_target }}" \
--out "target/release-artifacts/ethos-${{ matrix.artifact_target }}.smoke.json"
- name: validate draft artifact inventory
run: python3 .github/scripts/validate_release_artifact_inventory.py target/release-artifacts/*.inventory.json
- uses: actions/upload-artifact@v4
with:
name: ethos-cli-draft-${{ matrix.artifact_target }}
path: |
target/release-artifacts/*.tar.gz
target/release-artifacts/*.sha256
target/release-artifacts/*.inventory.json
target/release-artifacts/*.smoke.json