diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 06d0094049d..8ee1f8e8168 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -16,8 +16,8 @@ jobs: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Build artifacts run: | - git archive -o kokkos-${{ github.ref_name }}.zip HEAD - git archive -o kokkos-${{ github.ref_name }}.tar.gz HEAD + git archive --prefix=kokkos-${{ github.ref_name }}/ -o kokkos-${{ github.ref_name }}.zip HEAD + git archive --prefix=kokkos-${{ github.ref_name }}/ -o kokkos-${{ github.ref_name }}.tar.gz HEAD - name: Generate hashes shell: bash @@ -25,21 +25,14 @@ jobs: run: | # sha256sum generates sha256 hash for all artifacts. # base64 -w0 encodes to base64 and outputs on a single line. - echo "hashes=$(sha256sum kokkos-${{ github.ref_name }}.zip kokkos-${{ github.ref_name }}.tar.gz | base64 -w0)" >> "$GITHUB_OUTPUT" + sha256sum kokkos-${{ github.ref_name }}.zip kokkos-${{ github.ref_name }}.tar.gz > kokkos-${{ github.ref_name }}-SHA-256.txt + echo "hashes=$(base64 -w0 kokkos-${{ github.ref_name }}-SHA-256.txt)" >> "$GITHUB_OUTPUT" - - name: Upload source code (zip) + - name: Upload artifacts uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: - name: kokkos-${{ github.ref_name }}.zip - path: kokkos-${{ github.ref_name }}.zip - if-no-files-found: error - retention-days: 5 - - - name: Upload source code (tar.gz) - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 - with: - name: kokkos-${{ github.ref_name }}.tar.gz - path: kokkos-${{ github.ref_name }}.tar.gz + name: release-artifacts + path: kokkos-${{ github.ref_name }}* if-no-files-found: error retention-days: 5 @@ -65,19 +58,14 @@ jobs: runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') steps: - - name: Download kokkos-${{ github.ref_name }}.zip + - name: Download artifacts uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - name: kokkos-${{ github.ref_name }}.zip - - - name: Download kokkos-${{ github.ref_name }}.tar.gz - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 - with: - name: kokkos-${{ github.ref_name }}.tar.gz - + name: release-artifacts - name: Upload assets uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 with: files: | kokkos-${{ github.ref_name }}.zip kokkos-${{ github.ref_name }}.tar.gz + kokkos-${{ github.ref_name }}-SHA-256.txt