Skip to content

Commit e48c7bc

Browse files
ci: Add publish to PyPI step to release workflow (#53)
1 parent 087c5e9 commit e48c7bc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ jobs:
2626
env:
2727
MAVEN_ARGS: "--no-transfer-progress --batch-mode"
2828
runs-on: ubuntu-latest
29+
environment:
30+
name: pypi
31+
url: https://pypi.org/p/timefold-solver
32+
permissions:
33+
id-token: write # IMPORTANT: mandatory for trusted publishing
2934
steps:
3035
- name: Print inputs to the release workflow
3136
run: echo "${{ toJSON(github.event.inputs) }}"
@@ -119,7 +124,9 @@ jobs:
119124
out/jreleaser/trace.log
120125
out/jreleaser/output.properties
121126
122-
# TODO: Use https://github.com/marketplace/actions/pypi-publish to publish to PyPI here
127+
- name: Publish distribution to PyPI
128+
uses: pypa/gh-action-pypi-publish@release/v1
129+
if: ${{ github.event.inputs.dryRun == 'false' }}
123130

124131
# Pull Request will be created with the changes and a summary of next steps.
125132
- name: Put back the 999-SNAPSHOT version on the release branch

0 commit comments

Comments
 (0)