Skip to content

v0.9.16 - Session Sets: forks made visible, the sweep cleans what it read #37

v0.9.16 - Session Sets: forks made visible, the sweep cleans what it read

v0.9.16 - Session Sets: forks made visible, the sweep cleans what it read #37

Workflow file for this run

name: Publish to PyPI
# Triggered when a GitHub Release is PUBLISHED -- not on tag push. This makes
# "publish a release" the single deliberate ship action: force-moving or
# re-pushing a tag (e.g. amending a released commit) never re-fires PyPI, so
# we don't get spurious "400 File already exists" failures. The release event
# checks out the release's tag, so the right version is built.
on:
release:
types: [published]
# Manual fallback: publish on demand from the Actions tab ("Run workflow")
# without needing a GitHub Release -- backfill a skipped version (e.g. one
# where no Release was published), retry a failed publish, or ship a tag.
# skip-existing (below) keeps re-runs idempotent.
workflow_dispatch:
inputs:
ref:
description: "Tag/ref to build & publish (e.g. v0.5.0). Blank = current branch."
required: false
default: ""
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
# On a manual run, build the requested tag/ref; on a release event the
# default checkout already lands on the release's tag.
ref: ${{ github.event.inputs.ref || github.ref }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Check package
run: |
pip install twine
twine check dist/*
- uses: actions/upload-artifact@v7
with:
name: dist
path: dist/
publish:
needs: build
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v8
with:
name: dist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# Idempotency safety net: if a release is ever re-published or this
# job re-runs, skip files already on PyPI instead of failing.
skip-existing: true