-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1014 Bytes
/
ci.yml
File metadata and controls
41 lines (34 loc) · 1014 Bytes
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
41
name: Publish snapmaker_firmware_repacker
on:
push:
tags:
- '*'
jobs:
build:
name: Publish binaries
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build project
run: cargo build --release
- name: Package binary (only for release builds)
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p dist
if [ "${{ runner.os }}" = "Windows" ]; then
cp target/release/snapmaker_firmware_repacker.exe dist/
else
cp target/release/snapmaker_firmware_repacker dist/
fi
shell: bash
- uses: actions/upload-artifact@v4
with:
name: snapmaker_firmware_repacker-${{ matrix.os }}
path: dist/*
if-no-files-found: error