Skip to content

Commit

Permalink
Improve Pull Request title for preparing release (#7102)
Browse files Browse the repository at this point in the history
This change aims to make a Pull Request title for preparing release clearer.
For example, changing from `Prepare release` to `Prepare 15.10.3`.

For example, we can locally confirm the script:

```console
$ npx changeset status --output .changeset/status.json

$ new_version=$(jq -r '.releases[0].newVersion' < .changeset/status.json)

$ echo "new-version=${new_version}"
new-version=15.10.3
```
  • Loading branch information
ybiquitous committed Jul 27, 2023
1 parent ed111c3 commit b9f4255
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/releasing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,19 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Get changeset status
id: get-changeset-status
run: |
npx changeset status --output .changeset/status.json
new_version=$(jq -r '.releases[0].newVersion' < .changeset/status.json)
rm -v .changeset/status.json
echo "new-version=${new_version}" >> "$GITHUB_OUTPUT"
- name: Create release pull request
uses: changesets/action@v1
with:
commit: Prepare release
title: Prepare release
commit: Prepare ${{ steps.get-changeset-status.outputs.new-version }}
title: Prepare ${{ steps.get-changeset-status.outputs.new-version }}
# this expects you to have a npm script called version that runs some logic and then calls `changeset version`.
# We're also restoring `package.json` because we're using `np` for publishing
version: npm run version
Expand Down

0 comments on commit b9f4255

Please sign in to comment.