From 7d2fe2f7d12f0fea33653401f767763333513c4c Mon Sep 17 00:00:00 2001 From: Myasnikov Daniil Date: Wed, 29 Apr 2026 15:47:41 +0500 Subject: [PATCH] fix(ci): pass app token to Publish draft release step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Publish draft release step used the workflow's default GITHUB_TOKEN, which does not return draft releases from listReleases — so the script failed with "Draft release for vX.Y.Z not found" and every release tag had to be undrafted manually. This same bug was fixed once before in 4db55ac5eb18 ([ci] Add Github token to fetch draft releases) by adding github-token: GH_PAT to the listing step. It was lost during the refactor in 66a756b6 that combined the separate listing/flags/publish steps into a single Publish step, and not restored when f96b2da1 migrated remaining github-token usages from GH_PAT to the cozystack-ci App token. Add github-token: app-token.outputs.token to the merged step so it shares the same auth as the rest of the workflow. Assisted-By: Claude Signed-off-by: Myasnikov Daniil --- .github/workflows/pull-requests-release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull-requests-release.yaml b/.github/workflows/pull-requests-release.yaml index bb7f5da5..8bf52a3f 100644 --- a/.github/workflows/pull-requests-release.yaml +++ b/.github/workflows/pull-requests-release.yaml @@ -122,6 +122,7 @@ jobs: - name: Publish draft release uses: actions/github-script@v7 with: + github-token: ${{ steps.app-token.outputs.token }} script: | const tag = '${{ steps.get_tag.outputs.tag }}'; const m = tag.match(/^v(\d+\.\d+\.\d+)(-(?:alpha|beta|rc)\.\d+)?$/);