Skip to content

Rust build-and-release #77

Rust build-and-release

Rust build-and-release #77

name: Rust build-and-release
on:
workflow_dispatch: # Manually triggered
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release
- name: Get Version from Cargo.toml
id: cargo_version
run: |
THE_VERSION_STRING=$(cargo pkgid | cut -d@ -f2 | cut -d: -f2)
echo "::set-output name=t_cargo_version::$THE_VERSION_STRING"
- name: Zip Linux Binary
uses: vimtor/action-zip@v1
with:
files: /target/release/limonium
dest: /target/release/limonium-x86_64-unknown-linux-gnu.zip
- name: Deploy Release With Artifact
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ steps.cargo_version.outputs.t_cargo_version }}"
prerelease: false
files: |
target/release/limonium-x86_64-unknown-linux-gnu.zip