Skip to content

Commit c9faff0

Browse files
committed
Add permissions for GITHUB_TOKEN and clarify token usage in release workflow
1 parent 5501b4b commit c9faff0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/flutter-release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ env:
88
FLUTTER_VERSION: "3.35.2"
99
JAVA_VERSION: "17"
1010

11+
# Ensure the GITHUB_TOKEN has write permissions for repository contents so releases/tags can be created.
12+
permissions:
13+
contents: write
14+
1115
jobs:
1216
# Job to build and release APK when PR is merged to main
1317
build-and-release:
@@ -98,6 +102,8 @@ jobs:
98102
env:
99103
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100104
with:
105+
# Explicitly pass the token as an input to the action to avoid permission ambiguity
106+
token: ${{ secrets.GITHUB_TOKEN }}
101107
tag_name: v${{ steps.version_info.outputs.version }}-${{ steps.version_info.outputs.build_number }}
102108
name: ${{ steps.version_info.outputs.release_name }}
103109
body_path: CHANGELOG.md

0 commit comments

Comments
 (0)