-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23432 from storybookjs/fix-double-publishing
Release tooling: Fix double run of publish workflow (cherry picked from commit 4f1fe59)
- Loading branch information
1 parent
848ca60
commit bd342dd
Showing
1 changed file
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,15 @@ jobs: | |
run: | ||
working-directory: scripts | ||
steps: | ||
- name: Cancel if [skip ci] | ||
if: contains(github.event.head_commit.message, '[skip ci]') | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# From https://stackoverflow.com/a/75809743 | ||
run: | | ||
gh run cancel ${{ github.run_id }} | ||
gh run watch ${{ github.run_id }} | ||
- name: Checkout ${{ github.ref_name }} | ||
uses: actions/checkout@v3 | ||
with: | ||
|
@@ -71,7 +80,7 @@ jobs: | |
git config --global user.name "storybook-bot" | ||
git config --global user.email "[email protected]" | ||
git add . | ||
git commit -m "Bump version from $CURRENT_VERSION to $DEFERRED_NEXT_VERSION" || true | ||
git commit -m "Bump version from $CURRENT_VERSION to $DEFERRED_NEXT_VERSION [skip ci]" || true | ||
git push origin ${{ github.ref_name }} | ||
- name: Get current version | ||
|
@@ -149,7 +158,7 @@ jobs: | |
git pull | ||
git checkout origin/main ./CHANGELOG.md | ||
git add ./CHANGELOG.md | ||
git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }}" | ||
git commit -m "Update CHANGELOG.md for v${{ steps.version.outputs.current-version }} [skip ci]" | ||
git push origin next | ||
- name: Sync versions/next.json from `next` to `main` | ||
|