Unverified Commit 6820820a authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

reliability of the release action (#66637)

### What?

* [allow to re-run the action that publishes the
release](https://github.com/vercel/next.js/commit/ce4f629d73115a6cb61f17d6554b0ddf667171d4)
* [allow to force trigger a new
release](https://github.com/vercel/next.js/commit/7e26cd7794aaa0afc62169127edb09394692014e)

### Why?

On failure we might want to re-run the whole action or publish a new
release without changes
parent 48396e80
...@@ -22,7 +22,7 @@ jobs: ...@@ -22,7 +22,7 @@ jobs:
# canary next-swc binaries in the monorepo # canary next-swc binaries in the monorepo
NEXT_SKIP_NATIVE_POSTINSTALL: 1 NEXT_SKIP_NATIVE_POSTINSTALL: 1
outputs: outputs:
isRelease: ${{ github.event_name != 'workflow_dispatch' && steps.check-release.outputs.IS_RELEASE }} isRelease: ${{ steps.check-release.outputs.IS_RELEASE }}
steps: steps:
- name: Setup node - name: Setup node
uses: actions/setup-node@v4 uses: actions/setup-node@v4
......
...@@ -22,6 +22,11 @@ on: ...@@ -22,6 +22,11 @@ on:
- minor - minor
- major - major
force:
description: create a new release even if there are no new commits
default: false
type: boolean
secrets: secrets:
RELEASE_BOT_GITHUB_TOKEN: RELEASE_BOT_GITHUB_TOKEN:
required: true required: true
...@@ -66,7 +71,7 @@ jobs: ...@@ -66,7 +71,7 @@ jobs:
run: echo "LATEST_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV run: echo "LATEST_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Check if new commits since last tag - name: Check if new commits since last tag
if: ${{ github.event.inputs.releaseType != 'stable' }} if: ${{ github.event.inputs.releaseType != 'stable' && github.event.inputs.force != true }}
run: | run: |
if [ "$LATEST_TAG_COMMIT" = "$LATEST_COMMIT" ]; then if [ "$LATEST_TAG_COMMIT" = "$LATEST_COMMIT" ]; then
echo "No new commits. Exiting..." echo "No new commits. Exiting..."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment