-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix release notes diff in github release actions #1882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,11 +23,12 @@ jobs: | |
| steps: | ||
| - name: "Create release output" | ||
| run: echo '🎬 Release process for version ${{ env.RELEASE_VERSION }} started by @${{ github.triggering_actor }}' >> $GITHUB_STEP_SUMMARY | ||
|
|
||
| - uses: mongodb-labs/drivers-github-tools/secure-checkout@v2 | ||
| with: | ||
| app_id: ${{ vars.APP_ID }} | ||
| private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
| fetch-depth: 0 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this do? I think
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rozza yes fetch-depth 0 fetches all branches and tags. Per the GitHub Actions documentation (https://docs.github.com/en/actions/tutorials/create-an-example-workflow), drivers-github-tools is only pulled internally to run the action itself. The checkout operates on github.ref. |
||
|
|
||
| - name: "Store version numbers in env variables" | ||
| # The awk command to increase the version number was copied from | ||
|
|
@@ -43,6 +44,7 @@ jobs: | |
| # Example: 5.2.0 => 5.2.x | ||
| # Example: 5.2.0-beta1 => <current branch> | ||
| run: | | ||
| echo CURRENT_TAG=$(git describe --tags --abbrev=0) >> $GITHUB_ENV | ||
| echo RELEASE_VERSION=${{ inputs.version }} >> $GITHUB_ENV | ||
| echo RELEASE_VERSION_WITHOUT_SUFFIX=$(echo ${{ inputs.version }} | awk -F- '{print $1}') >> $GITHUB_ENV | ||
| if [[ "${{ inputs.version }}" =~ (alpha|beta|rc)[0-9]+$ ]]; then | ||
|
|
@@ -130,6 +132,7 @@ jobs: | |
| --target ${{ env.RELEASE_BRANCH }} \ | ||
| --title "Java Driver ${{ env.RELEASE_VERSION }} ($(date '+%B %d, %Y'))" \ | ||
| --generate-notes \ | ||
| --notes-start-tag "${{ env.CURRENT_TAG }}" \ | ||
| --draft\ | ||
| )" >> "$GITHUB_ENV" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we tested this in the fork yet? I also noticed the note: "Needs to be tested by triggering GitHub Actions manually before merging.”