Skip to content

Conversation

@bdrhn9
Copy link
Contributor

@bdrhn9 bdrhn9 commented Dec 16, 2025

Problem

The release workflow failed during tag creation with the following error: https://github.com/api3dao/signed-api/actions/runs/20229930044/job/58070438146#step:10:29

Root Cause

The issue stems from the change in main.yml that removed token: ${{ secrets.GH_ACCESS_TOKEN }} from actions/checkout. This token is necessary because it works similarly to git clone https://${GH_USERNAME}:${GH_TOKEN}@github.com/api3dao/signed-api.git where Git saves the token credentials for subsequent operations.

Later in the workflow, we define GH_ACCESS_TOKEN in tag-and-release, but that's only used for Octokit actions within the createGithubRelease function. However, this function also executes native git push commands, which need the saved credentials. Without the token in actions/checkout, these git push operations fail.

Solution

Added contents: write permission to the tag-and-release job. This allows the default GITHUB_TOKEN to have write access, eliminating the need for the custom GH_ACCESS_TOKEN in the checkout step.

Testing

Confirmed the fix by testing all alternatives in a test repository: https://github.com/bdrhn9/test-release

@bdrhn9 bdrhn9 requested a review from metobom December 16, 2025 08:29
@bdrhn9 bdrhn9 merged commit cebba11 into main Dec 16, 2025
5 checks passed
@bdrhn9 bdrhn9 deleted the bdrhn9/add-missing-permission branch December 16, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants