This repository was archived by the owner on Feb 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Validate that release notes are present before publishing a new release #2321
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,7 +45,7 @@ jobs: | |
|
|
||
| name: Tag public release | ||
|
|
||
| # Run if release-type is provided (not empty) an is not internal | ||
| # Run if release-type is provided (not empty) and is not internal | ||
| if: contains(github.event.inputs.release-type, '') == false && github.event.inputs.release-type != 'internal' | ||
|
|
||
| uses: ./.github/workflows/tag_release.yml | ||
|
|
@@ -111,6 +111,28 @@ jobs: | |
| - name: Select Xcode | ||
| run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer | ||
|
|
||
| - name: Extract Asana Task ID | ||
| id: task-id | ||
| uses: ./.github/actions/asana-extract-task-id | ||
| with: | ||
| task-url: ${{ github.event.inputs.asana-task-url }} | ||
|
|
||
| - name: Fetch and validate release notes | ||
| env: | ||
| TASK_ID: ${{ steps.task-id.outputs.task-id }} | ||
| ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
| run: | | ||
| curl -fLSs "https://app.asana.com/api/1.0/tasks/${TASK_ID}?opt_fields=notes" \ | ||
| -H "Authorization: Bearer ${ASANA_ACCESS_TOKEN}" \ | ||
| | jq -r .data.notes \ | ||
| | ./scripts/extract_release_notes.sh > release_notes.txt | ||
| release_notes="$(<release_notes.txt)" | ||
| if [[ ${#release_notes} == 0 || "$release_notes" == "<-- Add release notes here -->" ]]; then | ||
| echo "::error::Release notes are empty. Please add release notes to the Asana task and restart the workflow." | ||
| exit 1 | ||
|
Comment on lines
+129
to
+132
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. Lines 129-132 is the new code. The rest was moved so that the check happens before fetching the DMG. |
||
| fi | ||
| echo "RELEASE_NOTES_FILE=release_notes.txt" >> $GITHUB_ENV | ||
|
|
||
| - name: Set up Sparkle tools | ||
| env: | ||
| SPARKLE_URL: https://github.com/sparkle-project/Sparkle/releases/download/${{ vars.SPARKLE_VERSION }}/Sparkle-${{ vars.SPARKLE_VERSION }}.tar.xz | ||
|
|
@@ -131,23 +153,6 @@ jobs: | |
| echo "dmg-name=$DMG_NAME" >> $GITHUB_OUTPUT | ||
| echo "dmg-path=$DMG_NAME" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Extract Asana Task ID | ||
| id: task-id | ||
| uses: ./.github/actions/asana-extract-task-id | ||
| with: | ||
| task-url: ${{ github.event.inputs.asana-task-url }} | ||
|
|
||
| - name: Fetch release notes | ||
| env: | ||
| TASK_ID: ${{ steps.task-id.outputs.task-id }} | ||
| ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} | ||
| run: | | ||
| curl -fLSs "https://app.asana.com/api/1.0/tasks/${TASK_ID}?opt_fields=notes" \ | ||
| -H "Authorization: Bearer ${ASANA_ACCESS_TOKEN}" \ | ||
| | jq -r .data.notes \ | ||
| | ./scripts/extract_release_notes.sh > release_notes.txt | ||
| echo "RELEASE_NOTES_FILE=release_notes.txt" >> $GITHUB_ENV | ||
|
|
||
| - name: Generate appcast | ||
| id: appcast | ||
| env: | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is an unrelated change, but I forgot to save the file before submitting my previous pull request #2306