generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Description
I'm creating a workflow that creates/updates a draft release on every push to the dev
branch. In other words, every time a PR is merged to dev
(without a tag yet created:
- if the draft release does not exist, create it and generate release notes - this works fine
- if the draft already exists, update the body by overwriting it to reflect new commits added.
THis part doesn't work, the draft release gets updated but the body of release notes gets cleared and is empty.
If the draft release is deleted manually and the workflow is re-run, then it again creates properly the draft.
The workflow:
name: Release Drafter
on:
push:
branches:
- dev
permissions:
contents: write # This is required for pushing new release
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: "Github Actions Auth"
id: ghactions-auth
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.GHACTIONS_PAT_APP_ID }}
private-key: ${{ secrets.GHACTIONS_PAT_APP_ID_PK }}
owner: ${{ github.repository_owner }}
- uses: actions/checkout@v4
with:
token: ${{ steps.ghactions-auth.outputs.token }}
fetch-depth: 0
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@v9.9.0
id: semantic-release
with:
github_token: ${{ steps.ghactions-auth.outputs.token }}
root_options: "-c .semantic-release.toml"
push: "false"
changelog: "false"
vcs_release: "false"
- name: Draft the next GitHub release
uses: ncipollo/release-action@v1
with:
token: ${{ steps.ghactions-auth.outputs.token }}
tag: ${{ steps.semantic-release.outputs.tag }}
commit: "dev"
removeArtifacts: true
generateReleaseNotes: true
draft: true
allowUpdates: true
updateOnlyUnreleased: true
As you see, the future tag is generated by the python-semantic-release@v9.9.0
action.
Then, the release-action kicks in and correctly creates 1.0.0
release on the first run (when it does not exist) and the release notes are correctly generated.
However, on a re-run of the same workflow, it updates the draft release and clears the release notes, they are just empty. If I delete the draft and re-run again, then again the body is correctly generated.
Metadata
Metadata
Assignees
Labels
No labels