fix(cicd): permissions for release workflow #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
env: | |
python_version: 3.11 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
outputs: | |
released: ${{ steps.release.outputs.released }} | |
version: ${{ steps.release.outputs.version }} | |
tag: ${{ steps.release.outputs.tag }} | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install poetry & python-semantic-release | |
run: pipx install poetry~=1.8.3 python-semantic-release~=9.8.6 | |
- name: Set up Python ${{ env.python_version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.python_version }} | |
cache: "poetry" | |
- name: Python Semantic Release | |
id: release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_COMMIT_AUTHOR: "github-actions <[email protected]>" | |
run: | | |
semantic-release --strict version --commit |