Skip to content

Commit 38381ec

Browse files
chore: add Homebrew resource stanzas + merge release/publish workflows
- Formula: add resource stanzas for click, markdown-it-py, mdurl, pygments, pyyaml, rich (generated by brew update-python-resources) - Merge publish.yml into release.yml to fix GITHUB_TOKEN cascade limitation (tag -> release -> publish now runs in one workflow) - Delete standalone publish.yml - Update secrets baseline for formula sha256 hashes NOTE: PyPI trusted publisher config must be updated to reference workflow "release.yml" instead of "publish.yml" at https://pypi.org/manage/project/studyctl/settings/publishing/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 683f8b3 commit 38381ec

4 files changed

Lines changed: 128 additions & 57 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 0 additions & 56 deletions
This file was deleted.

‎.github/workflows/release.yml‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Release + Publish studyctl to PyPI.
2+
# Trigger: push a v* tag.
3+
#
4+
# Combined workflow (release + publish in one) to avoid the GITHUB_TOKEN
5+
# cascade limitation where events created by GITHUB_TOKEN don't trigger
6+
# other workflows.
7+
#
8+
# PyPI setup (one-time):
9+
# 1. Go to https://pypi.org/manage/project/studyctl/settings/publishing/
10+
# 2. Add GitHub as trusted publisher:
11+
# - Owner: NetDevAutomate
12+
# - Repository: socratic-study-mentor
13+
# - Workflow: release.yml
14+
# - Environment: pypi
15+
116
name: Release
217

318
on:
@@ -29,3 +44,41 @@ jobs:
2944
body: ${{ steps.changelog.outputs.content }}
3045
env:
3146
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
build:
49+
needs: release
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v4
53+
54+
- name: Install uv
55+
uses: astral-sh/setup-uv@v4
56+
57+
- name: Build package
58+
run: uv build --package studyctl --no-sources
59+
60+
- name: Upload artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: dist
64+
path: dist/
65+
66+
publish:
67+
needs: build
68+
runs-on: ubuntu-latest
69+
permissions:
70+
contents: read
71+
id-token: write # OIDC for PyPI trusted publishing
72+
environment:
73+
name: pypi
74+
url: https://pypi.org/project/studyctl/
75+
steps:
76+
- name: Download artifact
77+
uses: actions/download-artifact@v4
78+
with:
79+
name: dist
80+
path: dist/
81+
82+
- name: Publish to PyPI
83+
uses: pypa/gh-action-pypi-publish@release/v1
84+
# No API token needed -- uses OIDC

‎.secrets.baseline‎

Lines changed: 45 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Formula/studyctl.rb‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,36 @@ class Studyctl < Formula
2121
# Core deps: click, rich, pyyaml
2222
# Run `brew update-python-resources` after publishing to PyPI to populate these.
2323

24+
resource "click" do
25+
url "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz"
26+
sha256 "12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a"
27+
end
28+
29+
resource "markdown-it-py" do
30+
url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz"
31+
sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3"
32+
end
33+
34+
resource "mdurl" do
35+
url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz"
36+
sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"
37+
end
38+
39+
resource "pygments" do
40+
url "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz"
41+
sha256 "636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"
42+
end
43+
44+
resource "pyyaml" do
45+
url "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz"
46+
sha256 "d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f"
47+
end
48+
49+
resource "rich" do
50+
url "https://files.pythonhosted.org/packages/b3/c6/f3b320c27991c46f43ee9d856302c70dc2d0fb2dba4842ff739d5f46b393/rich-14.3.3.tar.gz"
51+
sha256 "b8daa0b9e4eef54dd8cf7c86c03713f53241884e814f4e2f5fb342fe520f639b"
52+
end
53+
2454
def install
2555
virtualenv_install_with_resources
2656
end

0 commit comments

Comments
 (0)