From de505a1637261e3f0b3a13e7db1db88d0270dfb5 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 27 Mar 2024 11:21:55 -0500 Subject: [PATCH] cd ansible-release: include artifact URL in PR body (#377) * cd ansible-release: include artifact URL in PR body This exposes the release artifact download URL in the PR body so we can access it while reviewing the release PR. * cd ansible-release: properly handle escape sequence Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein --- .github/workflows/ansible-release.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ansible-release.yml b/.github/workflows/ansible-release.yml index df374e922f..a7339e59b5 100644 --- a/.github/workflows/ansible-release.yml +++ b/.github/workflows/ansible-release.yml @@ -77,6 +77,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 + id: upload-artifact with: name: sdist-and-wheel path: antsibull/build/ansible-*.* @@ -93,12 +94,14 @@ jobs: working-directory: antsibull/build/ansible-build-data env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: >- - gh pr create - --base main - --head "publish-${ANSIBLE_VERSION}" - --title "Release Ansible ${ANSIBLE_VERSION}" - --body "${CI_COMMIT_MESSAGE}" + ARTIFACT_URL: ${{ steps.upload-artifact.outputs.artifact-url }} + run: | + body="$(echo -e "${CI_COMMIT_MESSAGE}\nRelease artifacts: <${ARTIFACT_URL}>")" + gh pr create \ + --base main \ + --head "publish-${ANSIBLE_VERSION}" \ + --title "Release Ansible ${ANSIBLE_VERSION}" \ + --body "${body}" # publish job downloads the arifacts and publish it to PyPI