Skip to content

Commit c3c5271

Browse files
author
Release Manager
committed
gh-40654: Fix release workflow to trigger changelog workflow <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> Fixes #39024 (comment). For why, see #39024 (comment) To see if this works well, after merged, we can just watch https://github.com/sagemath/website/actions/workflows/generate_changelog .yml after the next stable release. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #40654 Reported by: Kwankyu Lee Reviewer(s): Kwankyu Lee, Tobias Diez, user202729
2 parents 48499dc + a1f1b1f commit c3c5271

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)