Skip to content

Claude config

Claude config #39

Workflow file for this run

# A workflow to publish releases to PyPi and TestPyPi.
name: pypi-publish
on:
release:
types: [published]
workflow_dispatch:
pull_request:
branches:
- main
permissions: read-all
jobs:
build:
name: Build
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout Concordia
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Show Python setup
run: |
python --version
pip list
- name: Build distribution
run: |
python setup.py sdist bdist_wheel
# Workaround old setuptools not normalizing name in sdist.
for OLD in ./dist/gdm-concordia-*; do
NEW="$(echo "$OLD" | sed s/gdm-concordia/gdm_concordia/)"
mv "$OLD" "$NEW"
done
ls dist/*
- name: Save artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: dist
path: ./dist
retention-days: 1
test:
name: Test
needs: build
runs-on: ${{ matrix.os }}
env:
SYSTEM_VERSION_COMPAT: 0 # See https://github.com/actions/setup-python/issues/279.
timeout-minutes: 120
strategy:
fail-fast: ${{ github.event_name == 'release' }}
matrix:
os:
- macos-13
- macos-14
- ubuntu-22.04
- ubuntu-24.04
python-version:
- '3.11'
- '3.12'
- '3.13'
steps:
- name: Load artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: dist
path: ./dist
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install --upgrade setuptools
- name: Install source distribution
run: |
pip install dist/*.tar.gz
pip list
pip check
- name: Test source distribution
run: |
pip install pytest-xdist
pytest -n auto --pyargs concordia
publish:
name: Publish
needs: [build, test]
if: always() && needs.build.result == 'success' && needs.test.result != 'failure'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/gdm-concordia
permissions:
id-token: write
timeout-minutes: 10
steps:
- name: Load artifact
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: dist
path: ./dist
- name: Publish to TestPyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
with:
attestations: false
repository-url: https://test.pypi.org/legacy/
verbose: true
- name: Publish to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
with:
attestations: false
verbose: true