-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 901 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Build Project
on:
push:
branches:
- main
- release
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest]
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Install Rust
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
# Build the project
- name: Build the project
run: cargo build --release
# Upload the binary as an artifact, correctly naming it based on platform
- name: Upload binary artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform }}-binary
path: |
target/release/runlike${{ matrix.platform == 'windows-latest' && '.exe' || '' }}