Release 0.0.49 #4
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: Deploy Release | |
| on: | |
| pull_request: | |
| types: | |
| - closed | |
| branches: | |
| - master | |
| jobs: | |
| deploy: | |
| # Only run if PR was merged and source branch matches release/* | |
| if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Extract version from branch name | |
| id: version | |
| run: | | |
| BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | |
| VERSION="${BRANCH_NAME#release/}" | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Deploying version: $VERSION" | |
| - name: Create and push git tag | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag ${{ steps.version.outputs.version }} | |
| git push origin ${{ steps.version.outputs.version }} | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create ${{ steps.version.outputs.version }} \ | |
| --title "${{ steps.version.outputs.version }}" \ | |
| --generate-notes | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Install firebase-tools | |
| run: npm install -g firebase-tools | |
| - name: Deploy to Firebase | |
| env: | |
| FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
| run: firebase deploy |