From 13c5b9e205cb8dc0cca2dafd7097aaa72695a9a4 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Thu, 7 Nov 2024 07:14:02 +0100 Subject: [PATCH] Give each artifact a unique name --- .github/workflows/build.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 368cee3..1ba3ca4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,11 +18,17 @@ jobs: docker cp "$(docker create lauszus/socketsocketcan)":/socketsocketcan-wheel . mkdir dist cp socketsocketcan-wheel/socketsocketcan*.whl dist/ + + # Special characters are not allowed, so just use the Debian codename for the artifact name + name=$(echo -n "${{ matrix.docker_images }}" | cut -d ':' -f2) + echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV - name: Upload wheel as artifact uses: actions/upload-artifact@v4 with: - name: socketsocketcan-${{ github.sha }} + name: socketsocketcan-armv7l-$ARTIFACT_NAME-${{ github.sha }} path: dist + retention-days: 1 + if-no-files-found: error amd64: name: Build amd64 wheels runs-on: ubuntu-24.04 @@ -52,8 +58,10 @@ jobs: - name: Upload wheel as artifact uses: actions/upload-artifact@v4 with: - name: socketsocketcan-${{ github.sha }} + name: socketsocketcan-x86-${{ matrix.python-version }}-${{ github.sha }} path: dist + retention-days: 1 + if-no-files-found: error sdist: name: Build sdist runs-on: ubuntu-24.04 @@ -71,8 +79,10 @@ jobs: - name: Upload sdist as artifact uses: actions/upload-artifact@v4 with: - name: socketsocketcan-${{ github.sha }} + name: socketsocketcan-sdist-3.10-${{ github.sha }} path: dist + retention-days: 1 + if-no-files-found: error release: needs: [armv7l, amd64, sdist] name: Release @@ -85,8 +95,9 @@ jobs: python-version: '3.10' - uses: actions/download-artifact@v4 with: - name: socketsocketcan-${{ github.sha }} + pattern: socketsocketcan-*-*-${{ github.sha }} path: socketsocketcan + merge-multiple: true - name: Publish to private PyPI server if: startsWith(github.ref, 'refs/tags/') run: |