From 7ec649fdb06071895168dc437ea3e306830d57f0 Mon Sep 17 00:00:00 2001 From: Jason Ross <51939451+JMR-dev@users.noreply.github.com> Date: Wed, 24 Jun 2026 10:18:56 -0500 Subject: [PATCH] Target auto-release at the current repo (#2) The packaging workflow pushed alpha releases to noDRM/DeDRM_tools_autorelease using secrets.AUTORELEASE_KEY, which only exists on the upstream repo. On a fork the secret is empty, so the "Delete older auto-releases" step failed with "no GITHUB_TOKEN found", and even with a token a fork cannot publish into noDRM's release repo. Point the release at ${{ github.repository }} and use the built-in secrets.GITHUB_TOKEN (scoped to the current repo) with contents: write permission, so each fork publishes its own alpha release with no PAT required. Co-authored-by: Claude Opus 4.8 --- .github/workflows/release.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b324a4..4c36f91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,10 @@ jobs: package: name: Package and auto-release runs-on: ubuntu-latest + # Publish the alpha release into this repo's own Releases, so the built-in + # GITHUB_TOKEN (scoped to the current repo) is sufficient — no PAT needed. + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 @@ -28,26 +32,26 @@ jobs: - name: Delete older auto-releases uses: dev-drprasad/delete-older-releases@dfbe6be2a006e9475dfcbe5b8d201f1824c2a9fe # v0.3.4 with: - repo: noDRM/DeDRM_tools_autorelease + repo: ${{ github.repository }} keep_latest: 0 delete_tags: true env: - GITHUB_TOKEN: ${{ secrets.AUTORELEASE_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Auto-release id: autorelease uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1 with: tag_name: autorelease_${{ github.sha }} - repository: noDRM/DeDRM_tools_autorelease - token: ${{ secrets.AUTORELEASE_KEY }} + repository: ${{ github.repository }} + token: ${{ secrets.GITHUB_TOKEN }} name: Automatic alpha release with latest changes body: | This release is automatically generated by Github for each commit. This means, every time a change is made to the repo, a release with an untested copy of the plugin at that stage will be created. This will contain the most up-to-date code, but it's not tested at all and may be broken. - Last update based on Git commit [${{ github.sha }}](https://github.com/noDRM/DeDRM_tools/commit/${{ github.sha }}). + Last update based on Git commit [${{ github.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.sha }}). prerelease: true draft: false files: DeDRM_alpha_${{ github.sha }}.zip