Skip to content

Commit 37e94bb

Browse files
author
Oleg
committed
Use personal access token to create a tag and release
1 parent 76dd912 commit 37e94bb

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,12 @@ jobs:
136136

137137
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.build.outputs.current-version != needs.meta.outputs.latest-version
138138

139-
permissions:
140-
contents: write
141-
142139
env:
143140
TAG: v${{ needs.meta.outputs.latest-version }}
144141
COMMIT: ${{ github.event.before }}
145-
GH_TOKEN: ${{ github.token }}
142+
GH_TOKEN: ${{ secrets.PAT_GITHUB }}
146143

147144
steps:
148-
- name: Checkout current head
149-
uses: actions/checkout@v4
150-
with:
151-
ref: ${{ env.COMMIT }}
152145

153146
- name: Create a tag to mark previous latest version
154147
env:
@@ -161,6 +154,7 @@ jobs:
161154
/repos/${{ github.repository }}/git/refs
162155
-f "ref=refs/tags/$TAG"
163156
-f "sha=$COMMIT"
157+
164158
- name: Create release assotiated with the tag
165159
run: >
166160
gh api
@@ -171,7 +165,7 @@ jobs:
171165
-f "tag_name=$TAG"
172166
-f "name=$TAG"
173167
-f "body=Automatic release for $TAG"
174-
-f "generate_release_notes=true"
168+
-F "generate_release_notes=true"
175169
176170
177171
automerge:

0 commit comments

Comments
 (0)