Skip to content

Commit

Permalink
🔧 ci(github-actions): enhance release workflow and permissions
Browse files Browse the repository at this point in the history
- update workflow file to improve GitHub Actions configuration
- add necessary permissions for publishing and releasing
- use consistent token and release creation logic
  • Loading branch information
awwaawwa committed Jan 24, 2025
1 parent 5f9e1d7 commit eff1bcd
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

permissions:
id-token: write
contents: write
pull-requests: write

jobs:
build:
Expand Down Expand Up @@ -113,6 +115,10 @@ jobs:
needs:
- build
runs-on: ubuntu-latest
if: needs.build.outputs.is_release != ''
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4

Expand All @@ -122,13 +128,4 @@ jobs:
publish: true
tag: ${{ needs.build.outputs.is_release }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
"${{ needs.build.outputs.is_release }}"
--repo "$GITHUB_REPOSITORY"
--notes ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit eff1bcd

Please sign in to comment.