Skip to content

Commit a1f1b1f

Browse files
committed
Use github pat
1 parent cb03043 commit a1f1b1f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/dist.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' && github.event_name != 'pull_request' }}
8686
steps:
8787
- uses: actions/checkout@v4
88-
88+
8989
- name: Setup Conda environment
9090
uses: conda-incubator/setup-miniconda@v3
9191
with:
@@ -141,14 +141,14 @@ jobs:
141141
path: dist
142142
- name: Create release
143143
env:
144-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144+
GITHUB_PAT: ${{ secrets.RELEASE_CREATION_TOKEN }}
145145
run: |
146146
latest_release_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \
147147
| jq -r 'sort_by(.created_at) | last(.[]).tag_name')
148148
release_notes=$(curl -s \
149149
-X POST \
150150
-H "Accept: application/vnd.github+json" \
151-
-H "Authorization: Bearer $GITHUB_TOKEN" \
151+
-H "Authorization: Bearer $GITHUB_PAT" \
152152
-H "X-GitHub-Api-Version: 2022-11-28" \
153153
https://api.github.com/repos/${{ github.repository }}/releases/generate-notes \
154154
-d "{
@@ -160,7 +160,7 @@ jobs:
160160
curl -L \
161161
-X POST \
162162
-H "Accept: application/vnd.github+json" \
163-
-H "Authorization: Bearer $GITHUB_TOKEN" \
163+
-H "Authorization: Bearer $GITHUB_PAT" \
164164
-H "X-GitHub-Api-Version: 2022-11-28" \
165165
https://api.github.com/repos/${{ github.repository }}/releases \
166166
-d "{
@@ -174,6 +174,8 @@ jobs:
174174
files: |
175175
dist/*
176176
upstream/*
177+
token: ${{ secrets.GITHUB_TOKEN }}
178+
tag_name: ${{ github.ref_name }}
177179
permissions:
178180
contents: write
179181

0 commit comments

Comments
 (0)