fix: address CodeRabbit review feedback on PR #227 #49
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: Beta Release | |
| on: | |
| push: | |
| branches: [develop] | |
| # Manual re-run for releases that failed mid-way: `[skip ci]` release commits | |
| # never trigger the push event, and re-running a failed run pins the old SHA, | |
| # so semantic-release refuses with "local branch is behind the remote one". | |
| workflow_dispatch: | |
| concurrency: | |
| group: release-beta | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| release-beta: | |
| # Guard manual runs: beta releases may only be dispatched from develop. | |
| if: github.event_name != 'workflow_dispatch' || github.ref == 'refs/heads/develop' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci --no-audit | |
| - name: Build | |
| run: npm run build | |
| - name: Verify build output | |
| run: | | |
| if [[ ! -d "dist" ]]; then | |
| echo "Build failed: dist directory not found" | |
| exit 1 | |
| fi | |
| echo "Build verification passed" | |
| - name: Configure Git | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git | |
| git fetch --all --tags | |
| - name: Release Beta | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npx semantic-release |