Skip to content

Commit

Permalink
move permissions to specific step
Browse files Browse the repository at this point in the history
  • Loading branch information
equinor-ruaj committed Jun 22, 2023
1 parent 2cf2f8b commit bae4a66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/myworkflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
jobs:
myjob:
name: My job
permissions:
id-token: write
environment: production
runs-on: ubuntu-latest
steps:
Expand All @@ -30,6 +28,8 @@ jobs:
# TODO: publish should be separate job to minimize "permissions: id-token: write" scope
- name: publish
if: github.event_name == 'release'
permissions:
id-token: write
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

0 comments on commit bae4a66

Please sign in to comment.