From 9ab3a133d96bf2ebaa08f33f68bddcbf33a3ba53 Mon Sep 17 00:00:00 2001 From: farbanas Date: Wed, 25 Jan 2023 13:25:06 +0100 Subject: [PATCH] feat: add a workflow for building and publishing binaries to the artifact storage without attaching them to a release --- .../workflows/build-and-upload-binaries.yml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/build-and-upload-binaries.yml diff --git a/.github/workflows/build-and-upload-binaries.yml b/.github/workflows/build-and-upload-binaries.yml new file mode 100644 index 0000000000..54a3fb51d1 --- /dev/null +++ b/.github/workflows/build-and-upload-binaries.yml @@ -0,0 +1,59 @@ +name: Build and upload binaries to artifact storage + +on: + workflow_dispatch: + inputs: + add_tokio_unstable: + description: 'True to add RUSTFLAGS="--cfg tokio_unstable"' + required: true + default: false + type: boolean + +env: + NETWORK: mainnet + +jobs: + publish-nym: + strategy: + fail-fast: false + matrix: + platform: [ubuntu-20.04] + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + + - name: Install Dependencies (Linux) + run: sudo apt-get update && sudo apt-get -y install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools + continue-on-error: true + + - name: Sets env vars for tokio if set in manual dispatch inputs + run: | + echo 'RUSTFLAGS="--cfg tokio_unstable"' >> $GITHUB_ENV + if: github.event_name == 'workflow_dispatch' && inputs.add_tokio_unstable == true + + - name: Install Rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Build all binaries + uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace --release + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: nym-binaries-artifacts + path: | + target/release/nym-client + target/release/nym-gateway + target/release/nym-mixnode + target/release/nym-socks5-client + target/release/nym-api + target/release/nym-network-requester + target/release/nym-network-statistics + target/release/nym-cli + retention-days: 30