release #5
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: | |
workflow_run: | |
workflows: [ build ] | |
types: [ completed ] | |
branches: [ main ] | |
permissions: | |
contents: write | |
statuses: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# need this because workflow_run doesn't set the status otherwise | |
- name: Set pending commit status | |
uses: myrotvorets/[email protected] | |
with: | |
sha: ${{ github.event.workflow_run.head_sha }} | |
status: pending | |
- name: Bump version | |
id: version | |
uses: paulhatch/[email protected] | |
- name: Create GitHub tag and release | |
uses: softprops/[email protected] | |
with: | |
tag_name: ${{ steps.version.outputs.version_tag }} | |
generate_release_notes: true | |
- name: Set final commit status | |
uses: myrotvorets/[email protected] | |
if: always() | |
with: | |
sha: ${{ github.event.workflow_run.head_sha }} | |
status: ${{ job.status }} |