Skip to content

Pin adapter provenance to specification RC #3

Pin adapter provenance to specification RC

Pin adapter provenance to specification RC #3

Workflow file for this run

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: fef0dc6f4b17ff7141dad3f49d0524c63efbfed5
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