Use first-party software to publish GitHub Releases (#14128)

This commit is contained in:
Brendan authored and GitHub committed 2025-11-30 04:41:26 +00:00
1 parent f974137ab4
commit 03c66f53be
1 file changed
+8 -10
+8 -10
View File
@@ -97,20 +97,18 @@ jobs:
environment: release
if: github.repository_owner == 'sphinx-doc'
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
contents: write # needed to create a GitHub release
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Get release version
id: get_version
uses: actions/github-script@v8
with:
script: core.setOutput('version', context.ref.replace("refs/tags/v", ""))
- name: Create GitHub release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: "Sphinx ${{ steps.get_version.outputs.version }}"
body: "Changelog: https://www.sphinx-doc.org/en/master/changes.html"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: >-
gh release create "${TAG}"
--title "Sphinx ${TAG#v}"
--notes "Changelog: https://www.sphinx-doc.org/en/master/changes.html"