Skip to content

Add workflow permissions for release creation#5

Merged
j-almenara-r merged 2 commits intomainfrom
copilot/fix-release-creation-permissions
Jan 1, 2026
Merged

Add workflow permissions for release creation#5
j-almenara-r merged 2 commits intomainfrom
copilot/fix-release-creation-permissions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 1, 2026

The GitHub Actions workflow failed to create releases due to insufficient permissions. The softprops/action-gh-release action received a 403 error when attempting to create a release with the default GITHUB_TOKEN.

Changes

  • Added permissions: contents: write at workflow level in .github/workflows/build-apk.yml
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

permissions:
  contents: write

jobs:
  build:
    runs-on: ubuntu-latest

This grants the workflow token write access to repository contents, enabling release creation on the main branch.

Original prompt

This section details on the original issue you should resolve

<issue_title>Fix release creation</issue_title>
<issue_description>The release creation job failed: https://github.com/j-almenara-r/studious-garbanzo/actions/runs/20626206293

The job failed because the step "Create Release (on main branch only)" uses softprops/action-gh-release to create a GitHub release, but this action received a 403 error, meaning it does not have sufficient permissions. The error occurred while releasing with the default GITHUB_TOKEN.

Solution: Update your workflow to set correct permissions for the GITHUB_TOKEN. Add the following at the top level of your workflow (under name/on):

permissions: contents: write

Example (add after line 10 in your workflow):

YAML
permissions:
contents: write
This change grants the workflow the necessary rights to create releases.

See the full workflow file here (ref: 4bd06fc): .github/workflows/build-apk.yml.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: j-almenara-r <246562873+j-almenara-r@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix release creation job by updating permissions Add workflow permissions for release creation Jan 1, 2026
Copilot AI requested a review from j-almenara-r January 1, 2026 16:11
@j-almenara-r j-almenara-r marked this pull request as ready for review January 1, 2026 16:53
@j-almenara-r j-almenara-r merged commit 0f1f722 into main Jan 1, 2026
1 check passed
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.

Fix release creation

2 participants