Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for version calculation
ref: ${{ github.sha }} # Use the workflow/verifier source for this run.

- name: Checkout tagged package source
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ inputs.release_tag || github.ref }}
path: source
fetch-depth: 0 # Include the release tag for dynamic versioning.

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -111,7 +118,8 @@ jobs:
enable-cache: true

- name: Build package
run: uv build
working-directory: source
run: uv build --out-dir ../dist

- name: Verify build
run: |
Expand All @@ -125,7 +133,7 @@ jobs:
python scripts/verify_release_artifacts.py create-manifest \
--dist-dir dist --output dist/release-manifest.json \
--tag "$RELEASE_TAG" --repository "$GITHUB_REPOSITORY" \
--source-commit "$(git rev-parse HEAD)" --package umf-tablespec
--source-commit "$(git -C source rev-parse HEAD)" --package umf-tablespec

- name: Upload build artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -200,7 +208,13 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required by Hugo enableGitInfo.
- name: Checkout tagged site source
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ inputs.release_tag || github.ref }}
path: source
fetch-depth: 0 # Required by Hugo enableGitInfo.

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -211,14 +225,14 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
cache-dependency-path: website/go.sum
cache-dependency-path: source/website/go.sum

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: website/package-lock.json
cache-dependency-path: source/website/package-lock.json

- name: Set up Hugo
uses: peaceiris/actions-hugo@v3
Expand All @@ -233,7 +247,7 @@ jobs:
path: dist/

- name: Build Hugo microsite
working-directory: website
working-directory: source/website
run: |
npm ci
hugo --gc --minify
Expand All @@ -243,8 +257,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="$RELEASE_TAG"
python scripts/build_pages_artifact.py \
--site-dir website/public \
python source/scripts/build_pages_artifact.py \
--site-dir source/website/public \
--dist-dir dist \
--out-dir pages \
--repo "$GITHUB_REPOSITORY" \
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_distribution_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,6 @@ def test_release_workflows_bind_both_package_identities():
assert "workflow_dispatch:" in release
assert "ref: ${{ inputs.release_tag || github.ref }}" in release
assert 'git rev-parse "refs/tags/$RELEASE_TAG^{commit}"' in release
assert '--source-commit "$(git rev-parse HEAD)"' in release
assert "ref: ${{ github.sha }}" in release
assert "path: source" in release
assert '--source-commit "$(git -C source rev-parse HEAD)"' in release
Loading