diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a22552a7..34f80a1e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -83,7 +83,8 @@ jobs: mkdir -p release ZIP_OUTPUT=release/hostd_${GOOS}_${GOARCH}.zip go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w -linkmode external -extldflags "-static"' ./cmd/hostd - cp README.md LICENSE bin/* release/ + cp README.md LICENSE bin/ + zip -qj $ZIP_OUTPUT bin/* - uses: actions/upload-artifact@v4 with: name: hostd-linux-${{ matrix.go-arch }} @@ -148,12 +149,13 @@ jobs: GOOS: darwin GOARCH: ${{ matrix.go-arch }} run: | + ZIP_OUTPUT=release/hostd_${GOOS}_${GOARCH}.zip mkdir -p release go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w' ./cmd/hostd + cp README.md LICENSE bin/ /usr/bin/codesign --deep -f -v --timestamp -o runtime,library -s $APPLE_CERT_ID bin/hostd - ditto -ck bin/* hostd.zip* + ditto -ck bin $ZIP_OUTPUT xcrun notarytool submit -k ~/private_keys/AuthKey_$APPLE_API_KEY.p8 -d $APPLE_API_KEY -i $APPLE_API_ISSUER --wait --timeout 10m $ZIP_OUTPUT - cp README.md LICENSE bin/* release/ - uses: actions/upload-artifact@v4 with: name: hostd-darwin-${{ matrix.go-arch }} @@ -179,14 +181,24 @@ jobs: shell: bash run: | mkdir -p release + ZIP_OUTPUT=release/hostd_${GOOS}_${GOARCH}.zip go build -tags='netgo' -trimpath -o bin/ -a -ldflags '-s -w -linkmode external -extldflags "-static"' ./cmd/hostd azuresigntool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v bin/hostd.exe - cp README.md LICENSE bin/* release/ + cp README.md LICENSE bin/ + 7z a $ZIP_OUTPUT ./bin/* - uses: actions/upload-artifact@v4 with: name: hostd-windows-amd64 path: release/* - + combine-release-assets: + runs-on: ubuntu-latest + needs: [ build-linux, build-mac, build-windows ] + steps: + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: hostd-release-assets-combined + pattern: *.zip dispatch-homebrew: # only runs on full releases if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-') needs: [ docker, build-linux, build-mac, build-windows ] diff --git a/.github/workflows/publish_testnet.yml b/.github/workflows/publish_testnet.yml index 01dc4a73..2b77fc94 100644 --- a/.github/workflows/publish_testnet.yml +++ b/.github/workflows/publish_testnet.yml @@ -83,8 +83,10 @@ jobs: GOARCH: ${{ matrix.go-arch }} run: | mkdir -p release + ZIP_OUTPUT=release/hostd_zen_${GOOS}_${GOARCH}.zip go build -tags='testnet netgo' -trimpath -o bin/ -a -ldflags '-s -w -linkmode external -extldflags "-static"' ./cmd/hostd - cp README.md LICENSE bin/* release/ + cp README.md LICENSE bin/ + zip -qj $ZIP_OUTPUT bin/* - uses: actions/upload-artifact@v4 with: name: hostd-zen-linux-${{ matrix.go-arch }} @@ -149,12 +151,13 @@ jobs: GOOS: darwin GOARCH: ${{ matrix.go-arch }} run: | + ZIP_OUTPUT=release/hostd_zen_${GOOS}_${GOARCH}.zip mkdir -p release go build -tags='testnet netgo' -trimpath -o bin/ -a -ldflags '-s -w' ./cmd/hostd + cp README.md LICENSE bin/ /usr/bin/codesign --deep -f -v --timestamp -o runtime,library -s $APPLE_CERT_ID bin/hostd - ditto -ck bin/* hostd.zip + ditto -ck bin $ZIP_OUTPUT xcrun notarytool submit -k ~/private_keys/AuthKey_$APPLE_API_KEY.p8 -d $APPLE_API_KEY -i $APPLE_API_ISSUER --wait --timeout 10m $ZIP_OUTPUT - cp README.md LICENSE bin/* release/ - uses: actions/upload-artifact@v4 with: name: hostd-zen-darwin-${{ matrix.go-arch }} @@ -180,10 +183,21 @@ jobs: shell: bash run: | mkdir -p release + ZIP_OUTPUT=release/hostd_zen_${GOOS}_${GOARCH}.zip go build -tags='testnet netgo' -trimpath -o bin/ -a -ldflags '-s -w -linkmode external -extldflags "-static"' ./cmd/hostd azuresigntool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v bin/hostd.exe - cp README.md LICENSE bin/* release/ + cp README.md LICENSE bin/ + 7z a $ZIP_OUTPUT ./bin/* - uses: actions/upload-artifact@v4 with: name: hostd-zen-windows-amd64 - path: release/* \ No newline at end of file + path: release/* + combine-release-assets: + runs-on: ubuntu-latest + needs: [ build-linux, build-mac, build-windows ] + steps: + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: hostd-release-assets-combined + pattern: *.zip \ No newline at end of file