-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable prerelease builds
- Loading branch information
Curtis Gray
committed
Apr 2, 2024
1 parent
6ba6d1c
commit 45a4f59
Showing
4 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Update Wingman Prerelease Notes | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['Wingman App Build for Testing'] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
update-release-notes: | ||
permissions: write-all | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Download Artifact with Tag Name | ||
uses: actions/download-artifact@v4 | ||
id: tag-artifact | ||
with: | ||
name: tag-name | ||
run-id: ${{ github.event.workflow_run.id }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Read Tag Name | ||
id: tag | ||
run: | | ||
tag=$(cat ${{ steps.tag-artifact.outputs.download-path }}/tag.txt) | ||
echo "The tag is $tag" | ||
# set an environment variable to pass to the next step | ||
echo "TAG=$tag" >> $GITHUB_ENV | ||
- name: Update Prerelease Notes with Download Table | ||
shell: pwsh | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
# $tag = git describe --tags $(git rev-list --tags --max-count=1) | ||
# $tag=${{ env.TAG }} | ||
$tag = $env:TAG | ||
Write-Output "Updating release notes for tag $tag" | ||
gh release edit "$tag" --prerelease=true --draft=false | ||
$markdownTable = ./make-download-table.ps1 -tag "$tag" | ||
if (-not $markdownTable) { | ||
Write-Error "Failed to generate markdown table." | ||
exit 1 | ||
} | ||
gh release edit "$tag" --title "Wingman $tag" --notes "$markdownTable" --draft=false --prerelease=true --latest=false |
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Wingman App Build and Release | ||
name: Wingman App Build for Testing | ||
|
||
defaults: | ||
run: | ||
|
This file contains 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