ci: Update release workflow to read both GITHUB_TOKEN and RELEASE_TOKEN from the runner environment for improved clarity and security
This commit is contained in:
1 file changed
+2
-7
@@ -43,10 +43,10 @@ jobs:
|
|||||||
curl --silent --show-error --fail --location --output cliff.toml "$url"
|
curl --silent --show-error --fail --location --output cliff.toml "$url"
|
||||||
echo "config=cliff.toml" >> "$GITHUB_OUTPUT"
|
echo "config=cliff.toml" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Read GITHUB_TOKEN from the runner
|
- name: Read envs from the runner
|
||||||
uses: https://git.sothink.vn/gitea/global-workflow/.gitea/actions/load-env@main
|
uses: https://git.sothink.vn/gitea/global-workflow/.gitea/actions/load-env@main
|
||||||
with:
|
with:
|
||||||
names: GITHUB_TOKEN
|
names: GITHUB_TOKEN RELEASE_TOKEN
|
||||||
|
|
||||||
# Gitea's GITHUB_TOKEN is rejected by api.github.com. Pass a github.com PAT instead.
|
# Gitea's GITHUB_TOKEN is rejected by api.github.com. Pass a github.com PAT instead.
|
||||||
- name: Generate release notes
|
- name: Generate release notes
|
||||||
@@ -58,11 +58,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
OUTPUT: release-notes.md
|
OUTPUT: release-notes.md
|
||||||
|
|
||||||
- name: Read Release Token from the runner
|
|
||||||
uses: https://git.sothink.vn/gitea/global-workflow/.gitea/actions/load-env@main
|
|
||||||
with:
|
|
||||||
names: RELEASE_TOKEN
|
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v3
|
uses: softprops/action-gh-release@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in new issue
Block a user