Release #78
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 | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| prs_created: ${{ steps.release.outputs.prs_created }} | |
| pr_branch: ${{ fromJSON(steps.release.outputs.pr || '{}').headBranchName }} | |
| steps: | |
| - name: Run release-please | |
| id: release | |
| uses: googleapis/release-please-action@v4 | |
| with: | |
| release-type: node | |
| fix-release-pr: | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.prs_created == 'true' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Release PR branch | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ needs.release-please.outputs.pr_branch }} | |
| fetch-depth: 0 | |
| - uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version: 24 | |
| cache: true | |
| - name: Run format and lint with auto-fix | |
| run: vp check --fix | |
| - name: Commit and push if changed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| if ! git diff --staged --quiet; then | |
| git commit -m "chore: lint auto fix" | |
| git push | |
| echo "✅ Fixes committed and pushed to PR." | |
| else | |
| echo "✨ No fixes needed, tree is clean." | |
| fi | |
| build-release-assets: | |
| runs-on: ubuntu-latest | |
| needs: release-please | |
| if: ${{ needs.release-please.outputs.release_created == 'true' }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout release tag | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ needs.release-please.outputs.tag_name }} | |
| - uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version: 24 | |
| cache: true | |
| - name: Install dependencies | |
| run: vp install --frozen-lockfile | |
| - name: Build | |
| run: vp run build | |
| - name: Upload release assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.release-please.outputs.tag_name }} | |
| files: | | |
| dist/* |