Code Issues Pull Requests Actions Packages Projects Releases 15 Wiki Activity Security Code Quality

ci: Add step to read RELEASE_TOKEN from runner environment in release workflow for enhanced security
gitea/global-workflow: Release / Release (push) Successful in 7s

This commit is contained in:
tienbh committed 2026-11-20 14:50:12 +07:00
1 parent 02d48ef623
commit 8849861b24
1 file changed
+12
+12
View File
@@ -46,9 +46,21 @@ jobs:
env:
OUTPUT: release-notes.md
- name: Read Release Token from the runner
run: |
if [[ -z "${RELEASE_TOKEN:-}" ]]; then
exit 1
fi
{
echo "RELEASE_TOKEN<<__RELEASE_TOKEN__"
printf '%s\n' "$RELEASE_TOKEN"
echo "__RELEASE_TOKEN__"
} >> "$GITHUB_ENV"
- name: Create release
uses: softprops/action-gh-release@v3
with:
# prerelease only when the tag contains "-alpha", "-beta" or "-rc". ex: v1.0.0-alpha.1, v1.0.0-beta.1, v1.0.0-rc.1
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
body_path: release-notes.md
token: ${{ env.RELEASE_TOKEN }}