diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml deleted file mode 100644 index 49ba2ca0..00000000 --- a/.github/workflows/main.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: CI -on: - push: - branches: - - main -jobs: - stable: - uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main - with: - releaseScript: release - nodeVersion: 21 - packageManager: "pnpm" - secrets: - githubToken: ${{ secrets.GITHUB_TOKEN }} - npmToken: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 9e920f80..e2242463 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -38,30 +38,3 @@ jobs: run: pnpm install --frozen-lockfile - name: bench run: pnpm bench - - release_snapshot: - if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }} - name: Release snapshot - uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main - with: - npmTag: alpha - buildScript: build - nodeVersion: 20 - packageManager: pnpm - secrets: - githubToken: ${{ secrets.GITHUB_TOKEN }} - npmToken: ${{ secrets.NPM_TOKEN }} - - release_candidate: - uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main - name: Release candidate - if: ${{ github.event.pull_request.title == 'Upcoming Release Changes' }} - with: - npmTag: rc - restoreDeletedChangesets: true - buildScript: build - nodeVersion: 20 - packageManager: pnpm - secrets: - githubToken: ${{ secrets.GITHUB_TOKEN }} - npmToken: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..660d1c23 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,52 @@ +name: release +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + id-token: write + pull-requests: write + actions: write + contents: write + +jobs: + stable: + if: github.event_name == 'push' + uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main + with: + releaseScript: release + packageManager: pnpm + nodeVersion: 24 + secrets: + githubToken: ${{ secrets.GITHUB_TOKEN }} + + snapshot: + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.title != 'Upcoming Release Changes' + uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main + with: + npmTag: alpha + buildScript: build + packageManager: pnpm + nodeVersion: 24 + secrets: + githubToken: ${{ secrets.GITHUB_TOKEN }} + + rc: + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.title == 'Upcoming Release Changes' + uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main + with: + npmTag: rc + restoreDeletedChangesets: true + buildScript: build + packageManager: pnpm + nodeVersion: 24 + secrets: + githubToken: ${{ secrets.GITHUB_TOKEN }}