Skip to content

Commit cd47733

Browse files
committed
fix token passing once again
1 parent 5422ce4 commit cd47733

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ name: Release
22

33
on:
44
push:
5+
# This workflow will run only when you push a tag that starts with 'v'
6+
# For example: v1.2.1, v1.3.0, etc.
57
tags:
68
- 'v*.*.*'
7-
9+
810
permissions:
911
contents: write
1012
packages: write
@@ -17,7 +19,7 @@ jobs:
1719
- name: Checkout
1820
uses: actions/checkout@v4
1921
with:
20-
fetch-depth: 0
22+
fetch-depth: 0 # Fetch all history so GoReleaser can generate a changelog if needed
2123

2224
- name: Set up Go
2325
uses: actions/setup-go@v5
@@ -36,4 +38,8 @@ jobs:
3638
version: '~> v2'
3739
args: release --clean
3840
release_notes: ${{ steps.extract_notes.outputs.notes_path }}
39-
token: ${{ secrets.GITHUB_TOKEN }} # <-- Explicitly pass token
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
env:
43+
# This token is provided by GitHub automatically and is required
44+
# to create a release and upload assets.
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)