Skip to content

Add README and project URLs to PyPI metadata #3

Add README and project URLs to PyPI metadata

Add README and project URLs to PyPI metadata #3

Workflow file for this run

name: Release
on:
push:
tags:
- "*.*.*" # Trigger on tags like 0.1.0, 1.0.0, 0.1.0-rc1
jobs:
# 1. Verify code health before release
check:
name: Pre-release Checks
uses: ./.github/workflows/test.yml
# 2. Build and Publish
publish:
name: Build & Publish
needs: check
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/orgecc-command-mock
permissions:
id-token: write # Mandatory for Trusted Publishing (OIDC)
contents: write # Mandatory for creating GitHub Releases
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0 # Critical: setuptools_scm needs history to find tags
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install build tools
run: pip install build
- name: Build Distribution
# Relies on Makefile target 'build' which runs 'python -m build'
# setuptools_scm automatically detects the version from the git tag here
run: make build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: dist/*