ci: Use GITHUB_TOKEN with contents:write permission instead of PAT #70
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: Bump Version | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
jobs: | |
test: | |
name: Bump Version | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: PSanetra/git-semver-actions/next@v1 | |
id: next_version | |
- uses: PSanetra/git-semver-actions/latest@v1 | |
id: latest_version | |
- uses: PSanetra/git-semver-actions/markdown-log@v1 | |
id: markdown_log | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
if: ${{ steps.next_version.outputs.version != steps.latest_version.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: "v${{ steps.next_version.outputs.version }}" | |
body: "${{ steps.markdown_log.outputs.changelog }}" | |
release_name: Release ${{ steps.next_version.outputs.version }} | |
draft: false | |
prerelease: false |