Skip to content

Commit

Permalink
ci(release): create GitHub release (#5481)
Browse files Browse the repository at this point in the history
**What's the problem this PR addresses?**

[GitHub releases](https://github.com/yarnpkg/berry/releases) are created
manually.

**How did you fix it?**

Automated it with the `gh release create` command.

**Checklist**
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).
- [x] I have set the packages that need to be released for my changes to
be effective.
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.
  • Loading branch information
merceyz authored Jun 7, 2023
1 parent 9240489 commit ad03119
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
name: 'Release Branch'
jobs:
release:
name: 'Releasing a Patch Version'
name: 'Release a new stable version'
runs-on: ubuntu-latest

env:
Expand Down Expand Up @@ -45,9 +45,17 @@ jobs:
run: |
git config user.name "Yarn Bot"
git config user.email [email protected]
OLD_VERSION=$(YARN_IGNORE_PATH=1 node ./packages/yarnpkg-cli/bin/yarn.js --version)
./scripts/release/01-release-tags.sh
NEW_VERSION=$(YARN_IGNORE_PATH=1 node ./packages/yarnpkg-cli/bin/yarn.js --version)
git push --follow-tags
if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
gh release create "@yarnpkg/cli/$NEW_VERSION" --title "v$NEW_VERSION" --verify-tag --generate-notes --notes-start-tag "@yarnpkg/cli/$OLD_VERSION"
fi
- name: 'Upload the releases'
run: |
yarn config set -H 'npmAuthToken' "${{secrets.YARNBOT_NPM_TOKEN}}"
Expand Down

0 comments on commit ad03119

Please sign in to comment.