name: GitHub Release on: workflow_run: workflows: ["Publish Release"] types: - completed branches: - 'release/**' workflow_dispatch: permissions: contents: write jobs: create-github-release: name: Create GitHub Release runs-on: ubuntu-latest # Only run if the upstream workflow succeeded if: ${{ github.event.workflow_run.conclusion == 'success' }} environment: prod steps: - name: Checkout code uses: actions/checkout@v5 with: ref: ${{ github.event.workflow_run.head_branch }} fetch-depth: 0 - name: Extract version from branch id: extract run: .github/scripts/extract_version.sh "${{ github.event.workflow_run.head_branch }}" - name: Validate version format id: validate run: .github/scripts/validate_semver.sh "${{ steps.extract.outputs.version }}" - name: Extract release notes id: release-notes run: .github/scripts/extract_release_notes.sh "${{ steps.extract.outputs.version }}" - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: tag_name: v${{ steps.extract.outputs.version }} name: Release ${{ steps.extract.outputs.version }} body_path: release_notes.md prerelease: ${{ steps.validate.outputs.is_prerelease }} draft: false