-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (80 loc) · 2.73 KB
/
Copy pathrelease.yml
File metadata and controls
85 lines (80 loc) · 2.73 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
81
82
83
84
85
name: Release
env:
OPENSTATSPEC_SPECIFICATION_DIR: ${{ github.workspace }}/openstatspec-specification
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
release_ref:
description: "Existing release tag to rebuild and publish idempotently"
required: true
type: string
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
ref: refs/tags/${{ inputs.release_ref || github.ref_name }}
fetch-depth: 0
- uses: actions/setup-python@v7
with:
python-version: "3.13"
- name: Verify release tag exists and targets this package version
env:
RELEASE_TAG: ${{ inputs.release_ref || github.ref_name }}
run: |
set -eu
git fetch --force --no-tags origin "refs/tags/${RELEASE_TAG}:refs/tags/${RELEASE_TAG}"
python .github/verify_release_ref.py
- run: python -m pip install --upgrade pip build
- name: Verify required SPSS engine is publicly installable
run: >-
python -m pip download --only-binary=:all: --no-deps
--dest /tmp/openstatspec-engine-release
openstatspec-pyspssio==0.5.1.post2
- name: Build clean release distributions
run: python -m build
- name: Checkout normative specification fixtures
uses: actions/checkout@v7
with:
repository: OpenStatSpec/specification
ref: f2fdf687d8cb32b944ca55a3e9e7215ffc603019
path: openstatspec-specification
- name: Checkout required SPSS engine
uses: actions/checkout@v7
with:
repository: TonisOrmisson/pyspssio
ref: e069adf33c70bcd9e8e6ee495106479463a84fa2
path: openstatspec-pyspssio
- run: python -m pip install ./openstatspec-pyspssio
- run: python -m pip install -e ".[dev]"
- run: python -m pytest -m "not services"
- run: python -m venv /tmp/openstatspec-release-smoke
- run: /tmp/openstatspec-release-smoke/bin/python -m pip install ./openstatspec-pyspssio
- run: /tmp/openstatspec-release-smoke/bin/python -m pip install dist/*.whl
- run: /tmp/openstatspec-release-smoke/bin/openstatspec capabilities
- uses: actions/upload-artifact@v7
with:
name: python-distributions
path: dist/
publish:
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/openstatspec
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v8
with:
name: python-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true