Skip to content

Commit

Permalink
Fix: add environment
Browse files Browse the repository at this point in the history
  • Loading branch information
lwasser committed Feb 27, 2024
1 parent c42e9d0 commit 1c51a92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest
# This ensures that the publish action only runs in the main repository
# rather than forks
# Environment is encouraged so adding
environment: release
if: github.repository_owner == 'pyopensci'
permissions:
id-token: write # this permission is mandatory for pypi publishing
Expand Down Expand Up @@ -40,8 +42,8 @@ jobs:
echo ""
echo "Generated files:"
ls -lh dist/
- name: Publish package on test PyPI on merge in main branch # optional
- name: Publish package on test PyPI on merge in main branch
# Test push to test pypi on merge to main
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down

0 comments on commit 1c51a92

Please sign in to comment.