diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index bed417d..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: build - -on: - workflow_dispatch: - pull_request: - branches: - - "*.x" - - main - - beta - -permissions: - contents: write - pull-requests: write - -jobs: - build: - if: > - github.event_name == 'workflow_dispatch' || - ( - startsWith(github.head_ref, 'release-please--') && - github.event.pull_request.head.repo.full_name == github.repository && - github.event.pull_request.user.type == 'Bot' - ) - runs-on: ubuntu-latest - steps: - - uses: actions/create-github-app-token@v3 - id: app-token - with: - app-id: ${{ vars.RELEASER_APP_ID }} - private-key: ${{ secrets.RELEASER_APP_PRIVATE_KEY }} - - - uses: actions/checkout@v6 - with: - ref: ${{ github.head_ref || github.ref_name }} - token: ${{ steps.app-token.outputs.token }} - - - uses: actions/setup-node@v6 - with: - node-version-file: package.json - - - run: npm ci - - run: npm run build - - - uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0 - with: - commit_author: "${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>" - commit_message: "chore: update dist files" - file_pattern: dist/** diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5fc5201..ac5d7c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,30 @@ jobs: manifest-file: .release-please-manifest.json target-branch: ${{ github.ref_name }} + - uses: actions/checkout@v6 + if: steps.release-please.outputs.prs_created == 'true' + with: + ref: ${{ fromJSON(steps.release-please.outputs.pr).headBranchName }} + token: ${{ steps.app-token.outputs.token }} + + - uses: actions/setup-node@v6 + if: steps.release-please.outputs.prs_created == 'true' + with: + node-version-file: package.json + + - run: npm ci + if: steps.release-please.outputs.prs_created == 'true' + + - run: npm run build + if: steps.release-please.outputs.prs_created == 'true' + + - uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0 + if: steps.release-please.outputs.prs_created == 'true' + with: + commit_author: "${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>" + commit_message: "chore: update dist files" + file_pattern: dist/** + - name: Update major version tag id: update-major-tag if: steps.release-please.outputs.release_created == 'true' && github.ref_name != 'beta'