diff --git a/.github/workflows/publish-extension.yml b/.github/workflows/publish-extension.yml index 2744a87..5fdb5e3 100644 --- a/.github/workflows/publish-extension.yml +++ b/.github/workflows/publish-extension.yml @@ -36,15 +36,16 @@ jobs: echo "REGION=$(echo $output | grep 'Region' | cut -d' ' -f2)" >> $GITHUB_ENV - name: Create Release if: steps.extension-check-tag.outputs.match == 'true' - uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ env.TAG_NAME }} - release_name: Release for ${{ env.TAG_NAME }} - body: | - Release generated by GitHub Actions run [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}). - Layer ARN: ${{ env.LAYER_ARN }} - Region: ${{ env.REGION }} - draft: false - prerelease: false + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ github.ref_name }} + run: | + file=/tmp/somefile.zip + echo "Uploading $file to release $TAG" + gh release upload "$TAG" "$file" + # Fetch the existing release notes (if necessary) + existing_notes=$(gh release view "$TAG" --json body -q .body) + # Define new notes or modify the existing ones + new_notes="Updated notes here. Previous notes:\n$existing_notes" + # Update the release with new notes + gh release edit "$TAG" --notes "$new_notes"