Skip to content

Commit 813a782

Browse files
committed
🧪 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 pytest-dev#13891. [1]: https://cli.github.com/manual/gh_release_create [2]: https://cli.github.com/manual/gh_help_environment
1 parent 998433a commit 813a782

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-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/*

0 commit comments

Comments
 (0)