Skip to content

Build and Upload on new Tag #7

Build and Upload on new Tag

Build and Upload on new Tag #7

Workflow file for this run

name: Build and Upload on new Tag
on:
push:
tags:
- 'v*'
jobs:
build-and-upload:
name: Build and Upload Binaries
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout Code
uses: actions/checkout@v3
# Step 2: Set up Rust using dtolnay/rust-toolchain
- name: Set up Rust
uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-unknown-linux-gnu
# Step 3: Build in debug mode
- name: Build Debug Binary
run: cargo build --target x86_64-unknown-linux-gnu -p htmeta-cli
# Step 4: Build in release mode
- name: Build Release Binary
run: cargo build --target --release x86_64-unknown-linux-gnu -p htmeta-cli
# Step 5: Upload the binaries
- name: Upload Binaries
run: |
mkdir artifacts
cp target/x86_64-unknown-linux-gnu/debug/htmeta artifacts/x64-debug-linux-htmeta || true
cp target/x86_64-unknown-linux-gnu/release/htmeta artifacts/x64-release-linux-htmeta || true
shell: bash
# Step 6: Upload binaries
- name: Upload Binaries
uses: actions/upload-artifact@v4
with:
name: binaries
path: |
artifacts/*