mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-12 16:32:10 -05:00
Use first-party software to publish GitHub Releases (#14128)
This commit is contained in:
1 parent
f974137ab4
commit
03c66f53be
1 file changed
+8
-10
@@ -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"
|
||||
Reference in new issue
Block a user