From 735e451cc116da7ba276ff3bf8ffc97d08e44364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20J=C4=99drecki?= Date: Fri, 8 May 2026 16:02:28 +0200 Subject: [PATCH] Remove commit SHA from the version pushed to Test PyPI --- .github/workflows/cd.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b431537c..f1891559 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -12,7 +12,7 @@ jobs: # https://github.com/pypa/gh-action-pypi-publish/issues/217#issuecomment-1965727093 runs-on: ubuntu-latest outputs: - version: ${{ steps.get-version.outputs.version }} + version: ${{ steps.set-version.outputs.version }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd with: @@ -27,11 +27,8 @@ jobs: run: | VERSION_BASE="$(uv version --short)" RUN_NUMBER="${{ github.run_number }}" - COMMIT_SHA="$(git rev-parse --short HEAD)" - uv version --frozen "${VERSION_BASE}.dev${RUN_NUMBER}+g${COMMIT_SHA}" - - name: Get current version - id: get-version - run: echo "version=$(uv version --short)" >> "$GITHUB_OUTPUT" + uv version --frozen "${VERSION_BASE}.dev${RUN_NUMBER}" + echo "version=$(uv version --short)" >> "$GITHUB_OUTPUT" - name: Build packages for distribution run: uv build - name: Run AppInspect @@ -39,7 +36,7 @@ jobs: - name: Upload distributables uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a with: - name: splunk-sdk-${{ steps.get-version.outputs.version }} + name: splunk-sdk-${{ steps.set-version.outputs.version }}-g${{ github.sha }} path: dist/ - name: Generate API reference run: make -C ./docs html @@ -62,8 +59,7 @@ jobs: - name: Download distributables uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: - name: splunk-sdk-${{ needs.build-distributables.outputs.version }} - path: dist/ + name: splunk-sdk-${{ needs.build-distributables.outputs.version }}-${{ github.sha}} - name: Publish packages to Test PyPI uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b with: @@ -82,7 +78,7 @@ jobs: - name: Download distributables uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c with: - name: splunk-sdk-${{ needs.build-distributables.outputs.version }} + name: splunk-sdk-${{ needs.build-distributables.outputs.version }}-${{ github.sha}} path: dist/ - name: Publish packages to PyPI uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b