Skip to content

Commit f97eefc

Browse files
dunknowcodingclaude
andcommitted
Live PyPI + CI badges; token-based release workflow with skip-existing
paperfessor 1.0.0 is published on PyPI. README shows the live version + CI badges; the release workflow uses the PYPI_API_TOKEN secret and skip-existing so tagged releases are idempotent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d424977 commit f97eefc

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎.github/workflows/workflow.yml‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
name: CI & Publish
22

33
# Runs tests on every push/PR. Publishes to PyPI when a version tag
4-
# (v1.0.0, v1.0.1, ...) is pushed, using PyPI Trusted Publishing
5-
# (OIDC) — no API token stored in the repo.
4+
# (v1.0.1, v1.0.2, ...) is pushed, using the PYPI_API_TOKEN repo
5+
# secret. `skip-existing` makes re-runs safe (an already-published
6+
# version is skipped, not failed).
67
#
7-
# One-time PyPI setup (Settings on pypi.org, not in this file):
8-
# 1. Create the "paperfessor" project (or let the first upload create it).
9-
# 2. Add a Trusted Publisher:
10-
# Owner: dunknowcoding
11-
# Repository: Paperfessor
12-
# Workflow name: workflow.yml
13-
# Environment: pypi
14-
# 3. In GitHub → Settings → Environments, create an environment named "pypi".
15-
# Then push a tag: git tag v1.0.0 && git push origin v1.0.0
8+
# To cut a release: bump the version in pyproject.toml, then
9+
# git tag v1.0.1 && git push origin v1.0.1
10+
#
11+
# (Prefer PyPI Trusted Publishing instead of a stored token? Configure
12+
# a publisher on pypi.org for workflow.yml + environment "pypi", then
13+
# swap the publish step's `password` for `id-token: write` permissions.)
1614

1715
on:
1816
push:
@@ -69,12 +67,13 @@ jobs:
6967
if: startsWith(github.ref, 'refs/tags/v')
7068
runs-on: ubuntu-latest
7169
environment: pypi
72-
permissions:
73-
id-token: write # required for Trusted Publishing (OIDC)
7470
steps:
7571
- uses: actions/download-artifact@v4
7672
with:
7773
name: dist
7874
path: dist/
7975
- name: Publish to PyPI
8076
uses: pypa/gh-action-pypi-publish@release/v1
77+
with:
78+
password: ${{ secrets.PYPI_API_TOKEN }}
79+
skip-existing: true

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
*Supervised by Prof. Meerk — a meerkat who never stops watching over your research.*
1010

11-
[![PyPI](https://img.shields.io/badge/pip%20install-paperfessor-2E5E4E.svg)](https://pypi.org/project/paperfessor/)
11+
[![PyPI version](https://img.shields.io/pypi/v/paperfessor.svg?color=2E5E4E)](https://pypi.org/project/paperfessor/)
12+
[![CI](https://github.com/dunknowcoding/Paperfessor/actions/workflows/workflow.yml/badge.svg)](https://github.com/dunknowcoding/Paperfessor/actions/workflows/workflow.yml)
1213
[![License: MIT](https://img.shields.io/badge/License-MIT-2E5E4E.svg)](LICENSE)
1314
[![Python 3.11+](https://img.shields.io/badge/Python-3.11%2B-33475B.svg)](pyproject.toml)
1415
[![Platforms](https://img.shields.io/badge/OS-Windows%20%7C%20macOS%20%7C%20Linux-33475B.svg)](#installation)

0 commit comments

Comments
 (0)