Skip to content

Commit 744d52f

Browse files
committed
feat: add GitHub Packages publishing with twine
1 parent 32bd17d commit 744d52f

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

.github/workflows/regenerate-client.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ on:
44
workflow_dispatch:
55
inputs:
66
spec_version:
7-
description: 'API Spec Version'
7+
description: "API Spec Version"
88
required: true
99
type: string
1010
spec_commit:
11-
description: 'Devgraph commit SHA that triggered this'
11+
description: "Devgraph commit SHA that triggered this"
1212
required: true
1313
type: string
1414
# Optional: Also trigger on schedule to check for missed updates
1515
schedule:
16-
- cron: '0 2 * * *' # Daily at 2am UTC
16+
- cron: "0 2 * * *" # Daily at 2am UTC
1717

1818
jobs:
1919
regenerate:
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Python
2525
uses: actions/setup-python@v5
2626
with:
27-
python-version: '3.12'
27+
python-version: "3.12"
2828

2929
- name: Install Poetry
3030
uses: snok/install-poetry@v1
@@ -94,9 +94,6 @@ jobs:
9494
Auto-generated from devgraph@${{ inputs.spec_commit }}
9595
Spec URL: https://github.com/arctir/devgraph-api/tree/v${{ inputs.spec_version }}
9696
97-
🤖 Generated with [Claude Code](https://claude.com/claude-code)
98-
99-
Co-Authored-By: Claude <noreply@anthropic.com>
10097
EOF
10198
)"
10299
git push origin main
@@ -112,7 +109,15 @@ jobs:
112109
113110
# Build package
114111
poetry build
115-
echo "✓ Built package (publishing to GitHub Packages requires manual setup)"
112+
113+
# Publish to GitHub Packages
114+
pip install twine
115+
TWINE_USERNAME=${{ github.actor }} \
116+
TWINE_PASSWORD=${{ secrets.GITHUB_TOKEN }} \
117+
TWINE_REPOSITORY_URL=https://pypi.pkg.github.com/${{ github.repository_owner }}/${{ github.event.repository.name }} \
118+
twine upload --repository-url $TWINE_REPOSITORY_URL dist/*
119+
120+
echo "✓ Package built and published"
116121
else
117122
echo "No changes to commit"
118123
fi

0 commit comments

Comments
 (0)