From 16c0b4e69ac6a0a386c751c0e60a751e35d2f7c9 Mon Sep 17 00:00:00 2001 From: Moncef AOUDIA Date: Sat, 16 Dec 2023 00:23:17 +0100 Subject: [PATCH 1/2] feat: add optional/retry/safe/tested checksum --- .github/workflows/cd.yml | 46 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8ad1219d972..e74b6d31c4f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -92,7 +92,49 @@ jobs: tar czvf massa_${GITHUB_REF/refs\/tags\//}_${{ matrix.name }} massa fi cd - - - name: Publish + - name: Upload ${{ matrix.os }} artifacts + uses: actions/upload-artifact@v4 + with: + name: massa_artifacts_${{ matrix.os }} + path: | + massa_*.zip + massa_*.tar.gz + if-no-files-found: error + - name: Publish ${{ matrix.os }} artifacts + uses: softprops/action-gh-release@v1 + with: + files: | + massa_*.zip + massa_*.tar.gz + + checksum: + needs: release + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + - name: Move all artifacts to workspace + run: | + source_directory="artifacts" + release_directory="${{ github.workspace }}" + zip_pattern="massa_*.zip" + tar_pattern="massa_*.tar.gz" + + mkdir -p "$release_directory" + find "$source_directory" -type f \( -name "$zip_pattern" -o -name "$tar_pattern" \) -exec mv -t "$release_directory" {} + + - name: Generate checksums file + uses: jmgilman/actions-generate-checksum@v1 + with: + method: sha256 + patterns: | + massa_*.zip + massa_*.tar.gz + output: checksums.txt + - name: Publish checksums file uses: softprops/action-gh-release@v1 with: - files: 'massa_*' + files: | + checksums.txt From 27df4298eba6a9ac53bfe47f1030601b66ddc4f0 Mon Sep 17 00:00:00 2001 From: Moncef AOUDIA Date: Sat, 16 Dec 2023 00:40:48 +0100 Subject: [PATCH 2/2] fix: wrong step && artifacts names --- .github/workflows/cd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index e74b6d31c4f..da2a0c9be76 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -92,15 +92,15 @@ jobs: tar czvf massa_${GITHUB_REF/refs\/tags\//}_${{ matrix.name }} massa fi cd - - - name: Upload ${{ matrix.os }} artifacts + - name: Upload ${{ matrix.os }}_${{ matrix.platform }} artifacts uses: actions/upload-artifact@v4 with: - name: massa_artifacts_${{ matrix.os }} + name: massa_artifacts_${{ matrix.name }} path: | massa_*.zip massa_*.tar.gz if-no-files-found: error - - name: Publish ${{ matrix.os }} artifacts + - name: Publish ${{ matrix.os }}_${{ matrix.platform }} artifacts uses: softprops/action-gh-release@v1 with: files: |