Upload to build server in publish workflow for nym-vpn-core #14
Workflow file for this run
This file contains 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-nym-vpn-core-deb | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- ".github/workflows/build-nym-vpn-core-deb.yml" | |
workflow_call: | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_TARGET: release | |
WG_GO_LIB_PATH: ${{ github.workspace }}/build/lib/x86_64-unknown-linux-gnu | |
WG_GO_LIB_NAME: wireguard-go_deb_x86_64 | |
UPLOAD_DIR_DEB: deb_artifacts | |
jobs: | |
build-wireguard-go-deb: | |
uses: ./.github/workflows/build-wireguard-go-deb.yml | |
build-linux: | |
needs: build-wireguard-go-deb | |
runs-on: ubuntu-22.04 | |
outputs: | |
UPLOAD_DIR_DEB: ${{ env.UPLOAD_DIR_DEB }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install -y libdbus-1-dev libmnl-dev libnftnl-dev protobuf-compiler | |
- name: Install rust toolchain | |
uses: brndnmtthws/rust-action-rustup@v1 | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: Setup cargo deb | |
run: | | |
cargo install --locked cargo-deb | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
version: "21.12" # 3.21.12: the version on ubuntu 24.04. Don't change this! | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get workspace version | |
id: workspace-version | |
uses: nicolaiunrein/cargo-get@master | |
with: | |
subcommand: workspace.package.version --entry nym-vpn-core | |
- name: Install cargo-edit | |
run: cargo install --locked cargo-edit | |
- name: Append timestamp if it's a dev version | |
run: ./scripts/append-timestamp-to-version.sh nym-vpn-core/Cargo.toml ${{ steps.workspace-version.outputs.output }} | |
- name: Download wireguard-go artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.WG_GO_LIB_NAME }} | |
path: ${{ env.WG_GO_LIB_PATH }} | |
- name: Build nym-vpn-core debian packages | |
working-directory: nym-vpn-core | |
env: | |
RUSTFLAGS: "-L ${{ env.WG_GO_LIB_PATH }}" | |
run: | | |
cargo deb -p nym-vpnd | |
cargo deb -p nym-vpnc | |
ls -la target/debian/ || true | |
- name: Move things around to prepare for upload | |
env: | |
SRC_BINARY: nym-vpn-core/target/debian | |
run: | | |
mkdir ${{ env.UPLOAD_DIR_DEB }} | |
cp -vpr ${{ env.SRC_BINARY }}/nym-vpnc_*_amd64.deb ${{ env.UPLOAD_DIR_DEB }} | |
cp -vpr ${{ env.SRC_BINARY }}/nym-vpnd_*_amd64.deb ${{ env.UPLOAD_DIR_DEB }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.UPLOAD_DIR_DEB }} | |
path: ${{ env.UPLOAD_DIR_DEB }} | |
retention-days: 1 |