From 81dc3eb9f28a9ef1bf0a207a69193494f139ec19 Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Tue, 12 Sep 2023 06:16:07 +0200 Subject: [PATCH 1/7] ci: remove version tag from contained folder I want to create a scoop install manifest, but the version inside the zipped folder is pretty uncommon, the usual way is `$app_name-$target_platform` with the zip, can we please rename it? --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da554e7..5aa8223 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: run: | VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-unknown-linux-gnu - NAME=mask-$VERSION_TAG-$TARGET + NAME=mask-$TARGET mkdir $NAME mv ./target/$TARGET/release/mask ./$NAME/mask chmod +x ./$NAME/mask From f8e9db13a737c7dae9ad3a2cb0d62eeae143441d Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Tue, 12 Sep 2023 06:20:12 +0200 Subject: [PATCH 2/7] Update release.yml --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5aa8223..4703e38 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: run: | VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-unknown-linux-gnu - NAME=mask-$TARGET + NAME=mask-$VERSION_TAG-$TARGET mkdir $NAME mv ./target/$TARGET/release/mask ./$NAME/mask chmod +x ./$NAME/mask @@ -144,7 +144,7 @@ jobs: run: | VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-pc-windows-msvc - NAME=mask-$VERSION_TAG-$TARGET + NAME=mask-$TARGET mkdir $NAME mv ./target/$TARGET/release/mask.exe ./$NAME/mask.exe 7z a $NAME.zip $NAME From 944e24a37e424d1e4d973ee5df7fe8f32ddc7bbf Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Tue, 12 Sep 2023 06:30:23 +0200 Subject: [PATCH 3/7] Update release.yml --- .github/workflows/release.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4703e38..c29dd59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -148,6 +148,7 @@ jobs: mkdir $NAME mv ./target/$TARGET/release/mask.exe ./$NAME/mask.exe 7z a $NAME.zip $NAME + certutil -hashfile $NAME.zip sha256 | grep -E [A-Fa-f0-9]{64} > $NAME.zip.sha256 # NOTE: cannot use the attach-release-assets action because windows doesn't support docker-based actions. # Luckily we can just run the bash script directly. - name: Attach the binary to the release @@ -155,3 +156,8 @@ jobs: run: ./.github/actions/attach-release-assets/run.sh ./*.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Attach the binary to the release + shell: bash + run: ./.github/actions/attach-release-assets/run.sh ./*.sha256 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From cb53b10ff0fe3825fea63c24c946097fadff692e Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Tue, 12 Sep 2023 06:41:03 +0200 Subject: [PATCH 4/7] Update release.yml --- .github/workflows/release.yml | 69 +++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c29dd59..12da835 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,16 +18,24 @@ jobs: VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-unknown-linux-gnu NAME=mask-$VERSION_TAG-$TARGET + INCLUDE_NAME=mask-$TARGET mkdir $NAME - mv ./target/$TARGET/release/mask ./$NAME/mask - chmod +x ./$NAME/mask - zip -r $NAME.zip $NAME + mv ./target/$TARGET/release/mask ./$INCLUDE_NAME/mask + chmod +x ./$INCLUDE_NAME/mask + zip -r $NAME.zip $INCLUDE_NAME + shasum -a 256 $NAME.zip > $NAME.zip.sha256 - name: Attach the binary to the release uses: ./.github/actions/attach-release-assets env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: assets: ./*.zip + - name: Attach the binary to the release + uses: ./.github/actions/attach-release-assets + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + assets: ./*.sha256 release-linux-musl: runs-on: ubuntu-latest @@ -44,16 +52,24 @@ jobs: VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-unknown-linux-musl NAME=mask-$VERSION_TAG-$TARGET - mkdir $NAME - mv ./target/$TARGET/release/mask ./$NAME/mask - chmod +x ./$NAME/mask - zip -r $NAME.zip $NAME + INCLUDE_NAME=mask-$TARGET + mkdir $INCLUDE_NAME + mv ./target/$TARGET/release/mask ./$INCLUDE_NAME/mask + chmod +x ./$INCLUDE_NAME/mask + zip -r $NAME.zip $INCLUDE_NAME + shasum -a 256 $NAME.zip > $NAME.zip.sha256 - name: Attach the binary to the release uses: ./.github/actions/attach-release-assets env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: assets: ./*.zip + - name: Attach the binary to the release + uses: ./.github/actions/attach-release-assets + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + assets: ./*.sha256 release-macos-aarch64: runs-on: macos-latest @@ -77,16 +93,23 @@ jobs: VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=aarch64-apple-darwin NAME=mask-$VERSION_TAG-$TARGET - mkdir $NAME - mv ./target/$TARGET/release/mask ./$NAME/mask - chmod +x ./$NAME/mask - zip -r $NAME.zip $NAME + INCLUDE_NAME=mask-$TARGET + mkdir $INCLUDE_NAME + mv ./target/$TARGET/release/mask ./$INCLUDE_NAME/mask + chmod +x ./$INCLUDE_NAME/mask + zip -r $NAME.zip $INCLUDE_NAME + shasum -a 256 $NAME.zip > $NAME.zip.sha256 # NOTE: cannot use the attach-release-assets action because macOS doesn't support docker-based actions. # Luckily we can just run the bash script directly. - name: Attach the binary to the release run: ./.github/actions/attach-release-assets/run.sh ./*.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Attach the binary to the release + shell: bash + run: ./.github/actions/attach-release-assets/run.sh ./*.sha256 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release-macos-x86-64: runs-on: macos-latest @@ -107,16 +130,23 @@ jobs: VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-apple-darwin NAME=mask-$VERSION_TAG-$TARGET - mkdir $NAME - mv ./target/$TARGET/release/mask ./$NAME/mask - chmod +x ./$NAME/mask - zip -r $NAME.zip $NAME + INCLUDE_NAME=mask-$TARGET + mkdir $INCLUDE_NAME + mv ./target/$TARGET/release/mask ./$INCLUDE_NAME/mask + chmod +x ./$INCLUDE_NAME/mask + zip -r $NAME.zip $INCLUDE_NAME + shasum -a 256 $NAME.zip > $NAME.zip.sha256 # NOTE: cannot use the attach-release-assets action because macOS doesn't support docker-based actions. # Luckily we can just run the bash script directly. - name: Attach the binary to the release run: ./.github/actions/attach-release-assets/run.sh ./*.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Attach the binary to the release + shell: bash + run: ./.github/actions/attach-release-assets/run.sh ./*.sha256 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} release-homebrew: needs: release-macos-x86-64 @@ -144,10 +174,11 @@ jobs: run: | VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-pc-windows-msvc - NAME=mask-$TARGET - mkdir $NAME - mv ./target/$TARGET/release/mask.exe ./$NAME/mask.exe - 7z a $NAME.zip $NAME + NAME=mask-$VERSION_TAG-$TARGET + INCLUDE_NAME=mask-$TARGET + mkdir $INCLUDE_NAME + mv ./target/$TARGET/release/mask.exe ./$INCLUDE_NAME/mask.exe + 7z a $NAME.zip $INCLUDE_NAME certutil -hashfile $NAME.zip sha256 | grep -E [A-Fa-f0-9]{64} > $NAME.zip.sha256 # NOTE: cannot use the attach-release-assets action because windows doesn't support docker-based actions. # Luckily we can just run the bash script directly. From 6fa6068ac0999b2f9ff9442ba97e993aecf8177a Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Tue, 12 Sep 2023 06:47:51 +0200 Subject: [PATCH 5/7] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12da835..ca5be66 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: TARGET=x86_64-unknown-linux-gnu NAME=mask-$VERSION_TAG-$TARGET INCLUDE_NAME=mask-$TARGET - mkdir $NAME + mkdir $INCLUDE_NAME mv ./target/$TARGET/release/mask ./$INCLUDE_NAME/mask chmod +x ./$INCLUDE_NAME/mask zip -r $NAME.zip $INCLUDE_NAME From c93ac1dc8b1f6ee154965a280e9dfa4b40b7c528 Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Wed, 13 Sep 2023 08:52:47 +0200 Subject: [PATCH 6/7] Update release.yml --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca5be66..4823970 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: assets: ./*.zip - - name: Attach the binary to the release + - name: Attach the checksums to the release uses: ./.github/actions/attach-release-assets env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -64,7 +64,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: assets: ./*.zip - - name: Attach the binary to the release + - name: Attach the checksums to the release uses: ./.github/actions/attach-release-assets env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -105,7 +105,7 @@ jobs: run: ./.github/actions/attach-release-assets/run.sh ./*.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Attach the binary to the release + - name: Attach the checksums to the release shell: bash run: ./.github/actions/attach-release-assets/run.sh ./*.sha256 env: @@ -142,7 +142,7 @@ jobs: run: ./.github/actions/attach-release-assets/run.sh ./*.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Attach the binary to the release + - name: Attach the checksums to the release shell: bash run: ./.github/actions/attach-release-assets/run.sh ./*.sha256 env: @@ -187,7 +187,7 @@ jobs: run: ./.github/actions/attach-release-assets/run.sh ./*.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Attach the binary to the release + - name: Attach the checksums to the release shell: bash run: ./.github/actions/attach-release-assets/run.sh ./*.sha256 env: From 9c0149cfbc268d30c38869bf6cafd714f664ce74 Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Sat, 16 Sep 2023 07:08:45 +0200 Subject: [PATCH 7/7] Update release.yml --- .github/workflows/release.yml | 43 ++++++++++++++++------------------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4823970..4df33e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,11 +18,10 @@ jobs: VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-unknown-linux-gnu NAME=mask-$VERSION_TAG-$TARGET - INCLUDE_NAME=mask-$TARGET - mkdir $INCLUDE_NAME - mv ./target/$TARGET/release/mask ./$INCLUDE_NAME/mask - chmod +x ./$INCLUDE_NAME/mask - zip -r $NAME.zip $INCLUDE_NAME + mkdir $NAME + mv ./target/$TARGET/release/mask ./$NAME/mask + chmod +x ./$NAME/mask + zip -r $NAME.zip $NAME shasum -a 256 $NAME.zip > $NAME.zip.sha256 - name: Attach the binary to the release uses: ./.github/actions/attach-release-assets @@ -52,11 +51,10 @@ jobs: VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-unknown-linux-musl NAME=mask-$VERSION_TAG-$TARGET - INCLUDE_NAME=mask-$TARGET - mkdir $INCLUDE_NAME - mv ./target/$TARGET/release/mask ./$INCLUDE_NAME/mask - chmod +x ./$INCLUDE_NAME/mask - zip -r $NAME.zip $INCLUDE_NAME + mkdir $NAME + mv ./target/$TARGET/release/mask ./$NAME/mask + chmod +x ./$NAME/mask + zip -r $NAME.zip $NAME shasum -a 256 $NAME.zip > $NAME.zip.sha256 - name: Attach the binary to the release uses: ./.github/actions/attach-release-assets @@ -93,11 +91,10 @@ jobs: VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=aarch64-apple-darwin NAME=mask-$VERSION_TAG-$TARGET - INCLUDE_NAME=mask-$TARGET - mkdir $INCLUDE_NAME - mv ./target/$TARGET/release/mask ./$INCLUDE_NAME/mask - chmod +x ./$INCLUDE_NAME/mask - zip -r $NAME.zip $INCLUDE_NAME + mkdir $NAME + mv ./target/$TARGET/release/mask ./$NAME/mask + chmod +x ./$NAME/mask + zip -r $NAME.zip $NAME shasum -a 256 $NAME.zip > $NAME.zip.sha256 # NOTE: cannot use the attach-release-assets action because macOS doesn't support docker-based actions. # Luckily we can just run the bash script directly. @@ -130,11 +127,10 @@ jobs: VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-apple-darwin NAME=mask-$VERSION_TAG-$TARGET - INCLUDE_NAME=mask-$TARGET - mkdir $INCLUDE_NAME - mv ./target/$TARGET/release/mask ./$INCLUDE_NAME/mask - chmod +x ./$INCLUDE_NAME/mask - zip -r $NAME.zip $INCLUDE_NAME + mkdir $NAME + mv ./target/$TARGET/release/mask ./$NAME/mask + chmod +x ./$NAME/mask + zip -r $NAME.zip $NAME shasum -a 256 $NAME.zip > $NAME.zip.sha256 # NOTE: cannot use the attach-release-assets action because macOS doesn't support docker-based actions. # Luckily we can just run the bash script directly. @@ -175,10 +171,9 @@ jobs: VERSION_TAG=$(jq --raw-output '.release.tag_name' "$GITHUB_EVENT_PATH") TARGET=x86_64-pc-windows-msvc NAME=mask-$VERSION_TAG-$TARGET - INCLUDE_NAME=mask-$TARGET - mkdir $INCLUDE_NAME - mv ./target/$TARGET/release/mask.exe ./$INCLUDE_NAME/mask.exe - 7z a $NAME.zip $INCLUDE_NAME + mkdir $NAME + mv ./target/$TARGET/release/mask.exe ./$NAME/mask.exe + 7z a $NAME.zip $NAME certutil -hashfile $NAME.zip sha256 | grep -E [A-Fa-f0-9]{64} > $NAME.zip.sha256 # NOTE: cannot use the attach-release-assets action because windows doesn't support docker-based actions. # Luckily we can just run the bash script directly.