Skip to content

Commit 6afeee0

Browse files
Chris1221claude
andcommitted
ci: publish to PyPI from release-please workflow
Avoids GITHUB_TOKEN limitation where tag/release events created by the bot cannot trigger separate workflows. Instead, the publish job runs directly in the release-please workflow when release_created is true. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 02fa57a commit 6afeee0

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

.github/workflows/release-please.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,31 @@ jobs:
2121
id: release
2222
with:
2323
release-type: python
24-
package-name: yamldoc
24+
package-name: yamldoc
25+
26+
publish:
27+
needs: release-please
28+
if: ${{ needs.release-please.outputs.release_created }}
29+
runs-on: ubuntu-latest
30+
environment:
31+
name: pypi
32+
url: https://pypi.org/p/yamldoc
33+
permissions:
34+
id-token: write
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Install Pixi
40+
run: |
41+
curl -fsSL https://pixi.sh/install.sh | bash
42+
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
43+
44+
- name: Install dependencies
45+
run: pixi install
46+
47+
- name: Build package
48+
run: pixi run python -m build
49+
50+
- name: Publish package to PyPI
51+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)