Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
persist-credentials: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh i see to execute the checkout of the stable branch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because we are doing git push in later steps we need this credentials to be carried to next step in the current job.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah that makes sense, i realized after.

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -179,3 +179,12 @@ jobs:
if: github.event.inputs.dry_run == 'false'
run: |
npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release

- name: Updating `stable` branch after release.
if: github.event.inputs.dry_run == 'false'
run: |
git fetch origin
# note that this checkout creates a branch called `stable` if it does not exist
git checkout -B stable
git reset --hard origin/${GITHUB_REF##*/}
git push -f origin stable
Loading