Skip to content

Commit 15b4c75

Browse files
committed
Automatically generate release notes for draft release
1 parent 9867ae0 commit 15b4c75

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,12 @@ on:
88
description: "The version to be released. This is checked for consistency with the branch name and configuration"
99
required: true
1010
type: "string"
11-
jira-version-number:
12-
description: "JIRA version ID (e.g. 54321)"
13-
required: true
14-
type: "string"
1511

1612
env:
1713
# TODO: Use different token
1814
GH_TOKEN: ${{ secrets.MERGE_UP_TOKEN }}
1915
GIT_AUTHOR_NAME: "DBX PHP Release Bot"
2016
GIT_AUTHOR_EMAIL: "dbx-php@mongodb.com"
21-
default-release-message: |
22-
The PHP team is happy to announce that version {0} of the MongoDB integration for Laravel is now available.
23-
24-
**Release Highlights**
25-
26-
TODO: one or more paragraphs describing important changes in this release
27-
28-
A complete list of resolved issues in this release may be found in [JIRA](https://jira.mongodb.org/secure/ReleaseNote.jspa?version={1}&projectId=22488).
29-
30-
**Documentation**
31-
32-
Documentation for this library may be found in the [Readme](https://github.com/mongodb/laravel-mongodb/blob/$VERSION/README.md).
33-
34-
**Installation**
35-
36-
This library may be installed or upgraded with:
37-
38-
composer require mongodb/laravel-mongodb:{0}
39-
40-
Installation instructions for the `mongodb` extension may be found in the [PHP.net documentation](https://php.net/manual/en/mongodb.installation.php).
4117

4218
jobs:
4319
prepare-release:
@@ -80,15 +56,9 @@ jobs:
8056
git config user.name "${GIT_AUTHOR_NAME}"
8157
git config user.email "${GIT_AUTHOR_EMAIL}"
8258
83-
# Create a draft release with release message filled in
84-
- name: "Prepare release message"
85-
run: |
86-
cat > release-message <<'EOL'
87-
${{ format(env.default-release-message, inputs.version, inputs.jira-version-number) }}
88-
EOL
89-
59+
# Create draft release with release notes
9060
- name: "Create draft release"
91-
run: echo "RELEASE_URL=$(gh release create ${{ inputs.version }} --target ${{ github.ref_name }} --title "${{ inputs.version }}" --notes-file release-message --draft)" >> "$GITHUB_ENV"
61+
run: echo "RELEASE_URL=$(gh release create ${{ inputs.version }} --target ${{ github.ref_name }} --title "${{ inputs.version }}" --generate-notes --draft)" >> "$GITHUB_ENV"
9262

9363
# This step creates the signed release tag
9464
- name: "Create release tag"

0 commit comments

Comments
 (0)