File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 default : false
99 type : boolean
1010
11+ permissions :
12+ contents : write
13+
1114jobs :
1215 build-macos :
1316 name : Build macOS App
@@ -242,8 +245,6 @@ jobs:
242245 steps :
243246 - name : Checkout repository
244247 uses : actions/checkout@v4
245- with :
246- token : ${{ secrets.PAT_TOKEN }}
247248
248249 - name : Read version from pubspec.yaml
249250 id : get_version
@@ -264,16 +265,15 @@ jobs:
264265
265266 - name : Create and push git tag
266267 env :
267- GITHUB_TOKEN : ${{ secrets.PAT_TOKEN }}
268+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
268269 run : |
269270 TAG="${{ steps.get_version.outputs.tag }}"
270271 echo "Tag to create: $TAG"
271272
272- # Explicitly update remote with token to ensure correct authentication
273- git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
274-
275273 if git ls-remote --tags origin "$TAG" | grep -q "$TAG"; then
276- echo "Tag $TAG already exists on remote, skipping tag creation."
274+ echo "Error: Tag $TAG already exists on remote."
275+ echo "Please update the version in pubspec.yaml before creating a new release."
276+ exit 1
277277 else
278278 git config user.name "github-actions[bot]"
279279 git config user.email "github-actions[bot]@users.noreply.github.com"
You can’t perform that action at this time.
0 commit comments