Skip to content

Commit a1391f1

Browse files
committed
Build release artifacts before test checkouts
1 parent cc40d27 commit a1391f1

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
push:
88
tags:
99
- "v*"
10+
workflow_dispatch:
11+
inputs:
12+
release_ref:
13+
description: "Existing release tag to rebuild and publish idempotently"
14+
required: true
15+
type: string
1016

1117
permissions:
1218
contents: read
@@ -16,6 +22,19 @@ jobs:
1622
runs-on: ubuntu-latest
1723
steps:
1824
- uses: actions/checkout@v7
25+
with:
26+
ref: ${{ inputs.release_ref || github.ref }}
27+
- uses: actions/setup-python@v7
28+
with:
29+
python-version: "3.13"
30+
- run: python -m pip install --upgrade pip build
31+
- name: Verify required SPSS engine is publicly installable
32+
run: >-
33+
python -m pip download --only-binary=:all: --no-deps
34+
--dest /tmp/openstatspec-engine-release
35+
openstatspec-pyspssio==0.5.1.post2
36+
- name: Build clean release distributions
37+
run: python -m build
1938
- name: Checkout normative specification fixtures
2039
uses: actions/checkout@v7
2140
with:
@@ -28,19 +47,9 @@ jobs:
2847
repository: TonisOrmisson/pyspssio
2948
ref: e069adf33c70bcd9e8e6ee495106479463a84fa2
3049
path: openstatspec-pyspssio
31-
- uses: actions/setup-python@v7
32-
with:
33-
python-version: "3.13"
34-
- run: python -m pip install --upgrade pip build
35-
- name: Verify required SPSS engine is publicly installable
36-
run: >-
37-
python -m pip download --only-binary=:all: --no-deps
38-
--dest /tmp/openstatspec-engine-release
39-
openstatspec-pyspssio==0.5.1.post2
4050
- run: python -m pip install ./openstatspec-pyspssio
4151
- run: python -m pip install -e ".[dev]"
4252
- run: python -m pytest -m "not services"
43-
- run: python -m build
4453
- run: python -m venv /tmp/openstatspec-release-smoke
4554
- run: /tmp/openstatspec-release-smoke/bin/python -m pip install ./openstatspec-pyspssio
4655
- run: /tmp/openstatspec-release-smoke/bin/python -m pip install dist/*.whl
@@ -64,3 +73,5 @@ jobs:
6473
name: python-distributions
6574
path: dist/
6675
- uses: pypa/gh-action-pypi-publish@release/v1
76+
with:
77+
skip-existing: true

0 commit comments

Comments
 (0)