Skip to content

Commit

Permalink
Update CI workflow to include the workflow permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Apr 15, 2024
1 parent f87d13b commit 5d7de35
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- ".gitignore"
- "README.rst"

permissions:
contents: read

jobs:
build-package:
runs-on: ubuntu-latest
Expand All @@ -25,6 +28,11 @@ jobs:

- run: make build

- uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist/*

publish-package:
needs: build-package
runs-on: ubuntu-latest
Expand All @@ -34,15 +42,11 @@ jobs:
timeout-minutes: 20
environment:
name: testpypi
url: https://pypi.org/p/releasecmd
url: https://pypi.org/p/pathvalidate
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
with:
config: ${{ vars.PERMISSIONS_CONFIG }}

- uses: actions/download-artifact@v4
with:
name: dist
Expand Down

0 comments on commit 5d7de35

Please sign in to comment.