Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,33 @@ jobs:
permissions:
contents: write

env:
TAG_NAME: "${{ github.ref_name }}"

steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
path: "pulp_python"

- uses: "actions/setup-python@v5"
with:
python-version: "3.11"

- name: "Install towncrier"
run: |
pip install towncrier

- name: "Get release notes"
id: get_release_notes
run: |
NOTES=$(towncrier build --draft --version $TAG_NAME)
echo "body<<EOF" >> $GITHUB_OUTPUT
echo "$NOTES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: "Create release on GitHub"
uses: "actions/github-script@v7"
env:
TAG_NAME: "${{ github.ref_name }}"
with:
script: |
const { TAG_NAME } = process.env;
Expand All @@ -162,5 +184,6 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: TAG_NAME,
body: `${{ steps.get_release_notes.outputs.body }}`,
make_latest: "legacy",
});