Release SemVer #9
Workflow file for this run
This file contains hidden or 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 SemVer | |
| on: workflow_dispatch | |
| jobs: | |
| check_authorization: | |
| name: Check authorization to release new version | |
| runs-on: ubuntu-latest | |
| outputs: | |
| isAuthorized: ${{ steps.check-auth.outputs.is_authorized }} | |
| steps: | |
| - name: check-auth | |
| id: check-auth | |
| run: echo "is_authorized=${{ contains(secrets.DEPLOYMENT_AUTHORIZED_USERS, github.triggering_actor) }}" >> $GITHUB_OUTPUT | |
| release: | |
| name: Release | |
| needs: check_authorization | |
| if: needs.check_authorization.outputs.isAuthorized == 'true' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| didRelease: ${{ steps.semver.outputs.new_release_published }} | |
| newVersion: ${{ steps.semver.outputs.new_release_version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: semantic-release | |
| uses: cycjimmy/semantic-release-action@v3 | |
| id: semver | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.COSMISTACKBOT_ACCESS_TOKEN }} | |
| GIT_AUTHOR_NAME: cosmistack-bot | |
| GIT_AUTHOR_EMAIL: [email protected] | |
| GIT_COMMITTER_NAME: cosmistack-bot | |
| GIT_COMMITTER_EMAIL: [email protected] |