Skip to content

Commit

Permalink
.github/workflows/publish_release.yml : Run publishing job from main …
Browse files Browse the repository at this point in the history
…(non-reusable) workflow. Remove the two reusable workflows _publish_package.yml and _publish_package_test.yml.

Background for this change is a limitation recently introduced on pypi, which does not allow anylonger to run the GitHub action 'pypa/gh-action-pypi-publish' from a reusable workflow. The code hence needed to be moved upwards, from the reusable workflow _publish_package.yml into the (non-reusable) workflow publish_release.yml
See https://github.com/marketplace/actions/pypi-publish -> Note under "Trusted Publishing"
  • Loading branch information
ClaasRostock committed Nov 10, 2024
1 parent c18d7a8 commit d8351ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/_publish_package.yml

This file was deleted.

14 changes: 13 additions & 1 deletion .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,21 @@ jobs:
build_package:
uses: ./.github/workflows/_build_package.yml
publish_package:
name: Publish package
needs:
- build_package
uses: ./.github/workflows/_publish_package.yml
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
# with: # Uncomment this line to publish to testpypi
# repository-url: https://test.pypi.org/legacy/ # Uncomment this line to publish to testpypi
merge_into_release:
uses: ./.github/workflows/_merge_into_release.yml
secrets:
Expand Down

0 comments on commit d8351ba

Please sign in to comment.