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
|
environment: release
|
||||||
if: github.repository_owner == 'sphinx-doc'
|
if: github.repository_owner == 'sphinx-doc'
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # for softprops/action-gh-release to create GitHub release
|
contents: write # needed to create a GitHub release
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
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
|
- name: Create GitHub release
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
with:
|
env:
|
||||||
name: "Sphinx ${{ steps.get_version.outputs.version }}"
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
body: "Changelog: https://www.sphinx-doc.org/en/master/changes.html"
|
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