Skip to content

Commit

Permalink
Added Github worflow for release
Browse files Browse the repository at this point in the history
  • Loading branch information
sauliusgrigaitis committed Apr 23, 2024
1 parent 951aebd commit 22f282f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ jobs:
# The `ubuntu-22.04` image already includes Rustup:
# <https://github.com/actions/runner-images/blob/ubuntu22/20240401.4/images/ubuntu/Ubuntu2204-Readme.md#rust-tools>
# Running `rustc` or Cargo should automatically install the toolchain specified in `rust-toolchain.toml`.
- name: Build x86_64-unknown-linux-gnu
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --bin grandine --target x86_64-unknown-linux-gnu --features default-networks --profile release # --profile compact
- name: Build aarch64-unknown-linux-gnu
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --bin grandine --target aarch64-unknown-linux-gnu --features default-networks --profile release # --profile compact
- uses: Swatinem/rust-cache@v2
- name: Check if code is formatted
run: cargo fmt --check
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release

on:
push:
tags:
- 'release*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
lfs: true
# There should be no need to install Rustup or a Rust toolchain explicitly.
# The `ubuntu-22.04` image already includes Rustup:
# <https://github.com/actions/runner-images/blob/ubuntu22/20240401.4/images/ubuntu/Ubuntu2204-Readme.md#rust-tools>
# Running `rustc` or Cargo should automatically install the toolchain specified in `rust-toolchain.toml`.
- uses: Swatinem/rust-cache@v2
- name: Build x86_64-unknown-linux-gnu
run: cross build --bin grandine --target x86_64-unknown-linux-gnu --features default-networks --profile release # --profile compact
- name: Build x86_64-unknown-linux-gnu
run: cross build --bin grandine --target aarch64-unknown-linux-gnu --features default-networks --profile release # --profile compact

0 comments on commit 22f282f

Please sign in to comment.