Skip to content

Update Wingman Release Notes #140

Update Wingman Release Notes

Update Wingman Release Notes #140

name: Update Wingman Release Notes
on:
workflow_run:
workflows: ['Wingman App Build and Release']
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 Release 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=false --latest=true