You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2022/04/29 14:24:19 UTC

[maven-mvnd] branch master updated: Put back sha256 computation

This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git


The following commit(s) were added to refs/heads/master by this push:
     new 98d71fa  Put back sha256 computation
98d71fa is described below

commit 98d71fa3d748c5d6bb99553043104c230974564b
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Fri Apr 29 16:23:53 2022 +0200

    Put back sha256 computation
---
 .github/workflows/release.yaml | 34 ++++++++++++++++++++--------------
 build/publish.sh               | 13 ++++++++++++-
 2 files changed, 32 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 9bc56d2..d95c32b 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -61,11 +61,19 @@ jobs:
       - name: 'Build native distribution'
         run: ./mvnw clean verify -Pnative -Dmrm=false -B -ntp -e -DskipTests
 
+      - name: Compute sha256 checksums
+        run: |
+          for file in dist/target/mvnd-*.zip ; do
+            sha256sum ${file} | cut -d ' ' -f 1 > ${file}.sha256
+          done
+
       - name: 'Upload artifact'
         uses: actions/upload-artifact@v2
         with:
           name: artifacts
-          path: dist/target/mvnd-*.zip
+          path: |
+            dist/target/mvnd-*.zip
+            dist/target/mvnd-*.sha256
 
   source:
     name: 'Build source distributions'
@@ -90,16 +98,23 @@ jobs:
           components: 'native-image'
           github-token: ${{ secrets.GITHUB_TOKEN }}
 
-      - name: 'Build native distribution'
+      - name: 'Build source distribution'
         run: ./mvnw clean verify -Psource-distribution -pl :mvnd -Dmrm=false -B -ntp -e
 
+      - name: Compute sha256 checksums
+        run: |
+          for file in target/mvnd-*.zip target/mvnd-*.tar.gz ; do
+            sha256sum ${file} | cut -d ' ' -f 1 > ${file}.sha256
+          done
+
       - name: 'Upload artifact'
         uses: actions/upload-artifact@v2
         with:
           name: artifacts
           path: |
-            target/mvnd-*-src.zip
-            target/mvnd-*-src.tar.gz
+            target/mvnd-*.zip
+            target/mvnd-*.tar.gz
+            target/mvnd-*.sha256
 
 
   release:
@@ -135,14 +150,6 @@ jobs:
         run: |
           echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
 
-      - name: Compute sha256 checksums
-        run: |
-          sha256sum artifacts/mvnd-${{ env.VERSION }}-linux-amd64.zip | cut -d ' ' -f 1 > artifacts/mvnd-${{ env.VERSION }}-linux-amd64.zip.sha256
-          sha256sum artifacts/mvnd-${{ env.VERSION }}-darwin-amd64.zip | cut -d ' ' -f 1 > artifacts/mvnd-${{ env.VERSION }}-darwin-amd64.zip.sha256
-          sha256sum artifacts/mvnd-${{ env.VERSION }}-windows-amd64.zip | cut -d ' ' -f 1 > artifacts/mvnd-${{ env.VERSION }}-windows-amd64.zip.sha256
-          sha256sum artifacts/mvnd-${{ env.VERSION }}-src.zip | cut -d ' ' -f 1 > artifacts/mvnd-${{ env.VERSION }}-src.zip.sha256
-          sha256sum artifacts/mvnd-${{ env.VERSION }}-src.tar.gz | cut -d ' ' -f 1 > artifacts/mvnd-${{ env.VERSION }}-src.tar.gz.sha256
-
       - name: Create Release
         id: create_release
         uses: actions/create-release@v1
@@ -151,7 +158,7 @@ jobs:
         with:
           tag_name: ${{ env.VERSION }}
           release_name: ${{ env.VERSION }}
-          draft: false
+          draft: true
           prerelease: false
 
       - name: Deploy mvnd-src.zip
@@ -253,4 +260,3 @@ jobs:
           asset_path: artifacts/mvnd-${{ env.VERSION }}-windows-amd64.zip.sha256
           asset_name: mvnd-${{ env.VERSION }}-windows-amd64.zip.sha256
           asset_content_type: text/plain
-
diff --git a/build/publish.sh b/build/publish.sh
old mode 100644
new mode 100755
index 8692015..7e68606
--- a/build/publish.sh
+++ b/build/publish.sh
@@ -15,8 +15,19 @@
 # limitations under the License.
 #
 
+#
+# TODO: if multiple runs are available on the same tag, the artifactsUrl variable will contain several urls:
+# TODO:   artifactsUrl='/repos/apache/maven-mvnd/actions/runs/2245126309/artifacts /repos/apache/maven-mvnd/actions/runs/2245048166/artifacts /repos/apache/maven-mvnd/actions/runs/2235462006/artifacts'
+# TODO: the script should detect and print a meaningful error instead of a cryptic failure:
+# TODO:   accepts 1 arg(s), received 3
+# TODO:   Downloading artifacts from
+# TODO:   accepts 1 arg(s), received 0
+#
+
+# Enable for debug execution
+# set -x
+
 set -e
-set -x
 export VERSION=$1
 
 if [ "${VERSION}x" = "x" ]