From 960a53ff1c88f951cb9aa518d35e1a2056576f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=87=BA=F0=9F=87=A6=20Sviatoslav=20Sydorenko=20=28?= =?UTF-8?q?=D0=A1=D0=B2=D1=8F=D1=82=D0=BE=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1?= =?UTF-8?q?=D0=B8=D0=B4=D0=BE=D1=80=D0=B5=D0=BD=D0=BA=D0=BE=29?= Date: Wed, 12 Nov 2025 10:58:35 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20Run=20`gh=20release`=20w/o=20Git?= =?UTF-8?q?=20in=20CI/CD=20(#13942)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ๐Ÿงช 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 21ad5c65c979dfd2352784b3e074cd34f208dfdf) --- .github/workflows/deploy.yml | 6 +----- changelog/13891.contrib.rst | 1 + changelog/13942.contrib.rst | 3 +++ 3 files changed, 5 insertions(+), 5 deletions(-) create mode 120000 changelog/13891.contrib.rst create mode 100644 changelog/13942.contrib.rst diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ad7cc029c5e..c44ef2d8210 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -120,11 +120,6 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - persist-credentials: true - - name: Download Package uses: actions/download-artifact@v6 with: @@ -140,6 +135,7 @@ jobs: - name: Publish GitHub Release env: VERSION: ${{ github.event.inputs.version }} + GH_REPO: ${{ github.repository }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh release create --notes-file gh-release-notes.md --verify-tag "$VERSION" dist/* diff --git a/changelog/13891.contrib.rst b/changelog/13891.contrib.rst new file mode 120000 index 00000000000..b5cf5102ff8 --- /dev/null +++ b/changelog/13891.contrib.rst @@ -0,0 +1 @@ +13942.contrib.rst \ No newline at end of file diff --git a/changelog/13942.contrib.rst b/changelog/13942.contrib.rst new file mode 100644 index 00000000000..cdf23e68455 --- /dev/null +++ b/changelog/13942.contrib.rst @@ -0,0 +1,3 @@ +The CI/CD part of the release automation is now capable of +creating GitHub Releases without having a Git checkout on +disk -- by :user:`bluetech` and :user:`webknjaz`.