From 94560344684e62d8b092f4f6d6783da499036e2a Mon Sep 17 00:00:00 2001 From: Katsuhiro Ueno Date: Mon, 11 Dec 2023 01:56:05 +0900 Subject: [PATCH] add "next" branch for prereleases It is strongly recommended to do prerelease before releasing a stable release because we cannot cancel publishing a package n npm.js; once a package is uploaded, its version number is occupied forever even if it is unpublished. Making a stable version number unavailable due to failure of uploading or packaging is quite unsatisfactory. Prerelease allows us to make sure that a package can be successfully created and uploaded before stable release. --- .github/workflows/ci.yaml | 2 +- release.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 80c6408..11e75a9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,7 +32,7 @@ jobs: - run: pnpm --recursive --sequential run build release: needs: check - if: github.ref == 'refs/heads/latest' + if: github.ref == 'refs/heads/latest' || github.ref == 'refs/heads/next' permissions: contents: write issues: write diff --git a/release.js b/release.js index f7f903b..b89bcfa 100644 --- a/release.js +++ b/release.js @@ -106,7 +106,10 @@ for (const name of packages) { nextRelease.notes %>` const options = { - branches: ['latest'], + branches: [ + { name: 'latest' }, + { name: 'next', channel: 'next', prerelease: true } + ], tagFormat: name + '-v<%= version %>', plugins: [ wrap(commitAnalyzer),