From 2fb826280cfb3250aafb40da3fe2e60e86636e94 Mon Sep 17 00:00:00 2001 From: Michal Fiedorowicz Date: Thu, 6 Jun 2024 12:29:42 +0100 Subject: [PATCH] fix: GHA - release: replace underscores with hyphens in build filename Signed-off-by: Michal Fiedorowicz --- .github/workflows/release.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1b2de1c..d21dac5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -121,6 +121,7 @@ jobs: BUILD_VERSION: ${{ needs.get-next-version.outputs.new-release-version }} BUILD_TRACK: release BUILD_COMMIT: ${{ needs.get-next-version.outputs.short-sha }} + OUTPUT_FILENAME: ${{ env.PYTHON_PACKAGE_NAME }}-${{ needs.get-next-version.outputs.new-release-version }}.tar.gz steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v5 @@ -140,11 +141,15 @@ jobs: cat pyproject.toml | grep version python3 -m pip install --upgrade build python3 -m build --sdist --outdir dist/ + - name: Replace underscores with hyphens in build filename + run: | + BUILD_FILENAME=$(ls dist/ | grep tar.gz) + mv dist/$BUILD_FILENAME dist/${{ env.OUTPUT_FILENAME }} - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.PYTHON_PACKAGE_NAME }}-${{ env.BUILD_VERSION }}.tar.gz - path: dist/${{ env.PYTHON_PACKAGE_NAME }}-${{ env.BUILD_VERSION }}.tar.gz + name: ${{ env.OUTPUT_FILENAME }} + path: dist/${{ env.OUTPUT_FILENAME }} retention-days: 30 if-no-files-found: error - name: Publish release distributions to PyPI