fix: add missing reusable release workflows #2
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: Publish Release | ||
| on: | ||
| workflow_call: | ||
| secrets: | ||
| GITHUB_TOKEN: | ||
|
Check failure on line 6 in .github/workflows/reusable-publish-release.yml
|
||
| required: true | ||
| jobs: | ||
| publish-release: | ||
| if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, 'release:') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Extract Tag Name | ||
| id: extract_tag | ||
| run: | | ||
| TITLE="${{ github.event.pull_request.title }}" | ||
| TAG_NAME=$(echo "$TITLE" | sed 's/release: //') | ||
| echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV | ||
| VERSION_TITLE=${TAG_NAME#v} | ||
| echo "VERSION_TITLE=$VERSION_TITLE" >> $GITHUB_ENV | ||
| - name: Create Release Body File | ||
| env: | ||
| PR_BODY: ${{ github.event.pull_request.body }} | ||
| run: echo "$PR_BODY" > release_body.md | ||
| - name: Create GitHub Release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh release create ${{ env.TAG_NAME }} \ | ||
| --title "${{ env.VERSION_TITLE }}" \ | ||
| --notes-file release_body.md \ | ||
| --verify-tag | ||