Merge pull request #201 from akunzai/claude/nice-carson-o61m3a #38
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| draft-release: | |
| name: Update Release Draft | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Delete existing draft releases | |
| run: | | |
| gh release list --json tagName,isDraft \ | |
| --jq '.[] | select(.isDraft) | .tagName' | \ | |
| xargs -r -I{} gh release delete {} -y | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} | |
| - uses: release-drafter/release-drafter@v7 | |
| with: | |
| publish: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish-release: | |
| name: Publish GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check pre-release | |
| id: prerelease | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| if echo "$TAG" | grep -qE '(dev|beta|alpha|rc)'; then | |
| echo "prerelease=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "prerelease=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Publish release | |
| uses: release-drafter/release-drafter@v7 | |
| with: | |
| publish: true | |
| tag: ${{ github.ref_name }} | |
| prerelease: ${{ steps.prerelease.outputs.prerelease == 'true' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Bundle extension | |
| run: ./bundle.sh | |
| - name: Upload release artifact | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: ${{ github.ref_name }} | |
| run: gh release upload "$TAG" dist/pkg_externallogin.zip --clobber |