Skip to content

Commit 03c66f5

Browse files
authored
Use first-party software to publish GitHub Releases (#14128)
1 parent f974137 commit 03c66f5

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.github/workflows/create-release.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,18 @@ jobs:
9797
environment: release
9898
if: github.repository_owner == 'sphinx-doc'
9999
permissions:
100-
contents: write # for softprops/action-gh-release to create GitHub release
100+
contents: write # needed to create a GitHub release
101101
steps:
102102
- uses: actions/checkout@v6
103103
with:
104104
persist-credentials: false
105-
- name: Get release version
106-
id: get_version
107-
uses: actions/github-script@v8
108-
with:
109-
script: core.setOutput('version', context.ref.replace("refs/tags/v", ""))
110105

111106
- name: Create GitHub release
112-
uses: softprops/action-gh-release@v2
113107
if: startsWith(github.ref, 'refs/tags/')
114-
with:
115-
name: "Sphinx ${{ steps.get_version.outputs.version }}"
116-
body: "Changelog: https://www.sphinx-doc.org/en/master/changes.html"
108+
env:
109+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110+
TAG: ${{ github.ref_name }}
111+
run: >-
112+
gh release create "${TAG}"
113+
--title "Sphinx ${TAG#v}"
114+
--notes "Changelog: https://www.sphinx-doc.org/en/master/changes.html"

0 commit comments

Comments
 (0)