Skip to content

fix(ci): switch to legacy PyPI token for publish workflow #10

fix(ci): switch to legacy PyPI token for publish workflow

fix(ci): switch to legacy PyPI token for publish workflow #10

Workflow file for this run

# Canonical PyPI publish workflow for hawk-eco Python repos.
# Triggered by release-please when it pushes a v* tag.
# Source of truth: https://github.com/GrayCodeAI/hawk/blob/main/.shared-templates/workflows/python-release.yml.tmpl
#
# Uses PyPI legacy API token — OIDC trusted publishing requires manual PyPI config
# that is currently broken for this repository.
# To fix: remove any OIDC/trusted publisher config at https://pypi.org/manage/account/publishing/
# Then configure once with: https://github.com/GrayCodeAI/hawk/blob/main/.shared-templates/workflows/python-release.yml.tmpl
name: release
on:
push:
tags: ["v*"]
permissions:
contents: read
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
- name: Install build tooling
run: |
python -m pip install --upgrade pip build
- name: Build sdist + wheel
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: dist/