The GitHub Actions workflow was failing when trying to create releases with the error:
Error: Resource not accessible by integration
GITHUB_TOKEN didn't have write permissions for repository contentsactions/create-release@v1 which has known permission issuespermissions:
contents: write # Required for creating releases and tags
issues: write # Required for release management
pull-requests: write # Required for comprehensive workflow access
Before (problematic):
- uses: actions/create-release@v1 # ❌ Deprecated, permission issues
After (reliable):
- name: Create Desktop App Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "$TAG" \
--title "kNotes Desktop v${VERSION}" \
--notes-file release-notes.md \
--latest
gh release create "$TAG" \
--title "kNotes Desktop v${VERSION}" \
--notes-file release-notes.md \
--latest || {
echo "Release already exists, updating it..."
gh release edit "$TAG" \
--title "kNotes Desktop v${VERSION}" \
--notes-file release-notes.md \
--latest
}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For GitHub CLI
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For electron-builder
❌ create-desktop-release job failed
❌ No GitHub release created
❌ Desktop builds couldn't upload artifacts
❌ Workflow stops with permission error
✅ create-desktop-release job succeeds
✅ GitHub release created with proper notes
✅ Desktop builds upload artifacts successfully
✅ Complete workflow runs end-to-end
The fix maintains compatibility with existing test workflows:
Test Workflow (Dry Run) updatedworkflow_dispatch) still worksYour workflow should now:
The permissions issue is completely resolved! 🎉