v0.13.1 #84
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Releases | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| env: | |
| VERSION: "0.13.1" | |
| jobs: | |
| build-linux-amd64: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - name: Build Rust library | |
| run: cd crypto-rs && cargo build --release | |
| - name: Build Go binary | |
| run: CGO_ENABLED=1 go build -ldflags="-s -w" -o blocknet-core-amd64-linux . | |
| - name: Package | |
| run: | | |
| mkdir -p dist | |
| cp blocknet-core-amd64-linux dist/ | |
| cd dist && zip -q ../blocknet-core-amd64-linux-${{ env.VERSION }}.zip blocknet-core-amd64-linux | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: blocknet-core-amd64-linux-${{ env.VERSION }} | |
| path: blocknet-core-amd64-linux-${{ env.VERSION }}.zip | |
| build-linux-arm64: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - name: Build Rust library | |
| run: cd crypto-rs && cargo build --release | |
| - name: Build Go binary | |
| run: CGO_ENABLED=1 go build -ldflags="-s -w" -o blocknet-core-arm64-linux . | |
| - name: Package | |
| run: | | |
| mkdir -p dist | |
| cp blocknet-core-arm64-linux dist/ | |
| cd dist && zip -q ../blocknet-core-arm64-linux-${{ env.VERSION }}.zip blocknet-core-arm64-linux | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: blocknet-core-arm64-linux-${{ env.VERSION }} | |
| path: blocknet-core-arm64-linux-${{ env.VERSION }}.zip | |
| build-macos-arm64: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - name: Build Rust library | |
| run: cd crypto-rs && cargo build --release | |
| - name: Build Go binary | |
| run: CGO_ENABLED=1 go build -ldflags="-s -w" -o blocknet-core-arm64-macos . | |
| - name: Package | |
| run: | | |
| mkdir -p dist | |
| cp blocknet-core-arm64-macos dist/ | |
| cd dist && zip -q ../blocknet-core-arm64-macos-${{ env.VERSION }}.zip blocknet-core-arm64-macos | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: blocknet-core-arm64-macos-${{ env.VERSION }} | |
| path: blocknet-core-arm64-macos-${{ env.VERSION }}.zip | |
| build-macos-amd64: | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| - name: Build Rust library | |
| run: cd crypto-rs && cargo build --release | |
| - name: Build Go binary | |
| run: CGO_ENABLED=1 go build -ldflags="-s -w" -o blocknet-core-amd64-macos . | |
| - name: Package | |
| run: | | |
| mkdir -p dist | |
| cp blocknet-core-amd64-macos dist/ | |
| cd dist && zip -q ../blocknet-core-amd64-macos-${{ env.VERSION }}.zip blocknet-core-amd64-macos | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: blocknet-core-amd64-macos-${{ env.VERSION }} | |
| path: blocknet-core-amd64-macos-${{ env.VERSION }}.zip | |
| build-windows-amd64: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: >- | |
| mingw-w64-x86_64-gcc | |
| mingw-w64-x86_64-rust | |
| mingw-w64-x86_64-go | |
| zip | |
| - name: Build Rust library | |
| run: cd crypto-rs && cargo build --release | |
| - name: Build Go binary | |
| run: CGO_ENABLED=1 go build -ldflags="-s -w" -o blocknet-core-amd64-windows.exe . | |
| - name: Package | |
| run: | | |
| mkdir -p dist | |
| cp blocknet-core-amd64-windows.exe dist/ | |
| cd dist && zip -q ../blocknet-core-amd64-windows-${{ env.VERSION }}.zip blocknet-core-amd64-windows.exe | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: blocknet-core-amd64-windows-${{ env.VERSION }} | |
| path: blocknet-core-amd64-windows-${{ env.VERSION }}.zip | |
| create-checksums: | |
| needs: [build-linux-amd64, build-linux-arm64, build-macos-arm64, build-macos-amd64, build-windows-amd64] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: releases | |
| merge-multiple: true | |
| - name: Generate checksums | |
| run: | | |
| cd releases | |
| sha256sum *.zip > SHA256SUMS.txt | |
| cat SHA256SUMS.txt | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: blocknet-core-releases-${{ env.VERSION }} | |
| path: releases/ | |
| release: | |
| needs: create-checksums | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: blocknet-core-releases-${{ env.VERSION }} | |
| path: releases | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: releases/* | |
| draft: false | |
| prerelease: false |