Skip to content

Commit a9f7e6e

Browse files
🧪 Run gh release w/o Git in CI/CD (#13942) (#13947)
* 🧪 Run `gh release` w/o Git in CI/CD It is possible to use `gh release create --repo=` [[1]] so that GH CLI does not need to infer the repository information from the Git repository. GH CLI supports passing such options via environment values [[2]], which is what this patch makes use of. It's a follow-up for #13891. [1]: https://cli.github.com/manual/gh_release_create [2]: https://cli.github.com/manual/gh_help_environment * 📝 Add a change note for PRs #13942 and #13891 (cherry picked from commit 21ad5c6) Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
1 parent 2682a66 commit a9f7e6e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,6 @@ jobs:
120120
permissions:
121121
contents: write
122122
steps:
123-
- uses: actions/checkout@v5
124-
with:
125-
fetch-depth: 0
126-
persist-credentials: true
127-
128123
- name: Download Package
129124
uses: actions/download-artifact@v6
130125
with:
@@ -140,6 +135,7 @@ jobs:
140135
- name: Publish GitHub Release
141136
env:
142137
VERSION: ${{ github.event.inputs.version }}
138+
GH_REPO: ${{ github.repository }}
143139
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144140
run: |
145141
gh release create --notes-file gh-release-notes.md --verify-tag "$VERSION" dist/*

changelog/13891.contrib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
13942.contrib.rst

changelog/13942.contrib.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The CI/CD part of the release automation is now capable of
2+
creating GitHub Releases without having a Git checkout on
3+
disk -- by :user:`bluetech` and :user:`webknjaz`.

0 commit comments

Comments
 (0)