-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.57 KB
/
Copy pathrelease.yml
File metadata and controls
57 lines (50 loc) · 1.57 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build and Release Native Binaries
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: tech
asset_name: tech-linux-x64
- os: macos-latest
artifact_name: techscript
asset_name: tech-macos-x64
- os: windows-latest
artifact_name: techscript.exe
asset_name: techscript-windows-x64.exe
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build in Release mode
run: |
cd runtime
cargo build --release
- name: Rename and Prepare Assets
shell: bash
run: |
if [ "${{ matrix.os }}" = "windows-latest" ]; then
mv runtime/target/release/techscript.exe ${{ matrix.asset_name }}
else
# Rename based on actual binary name produced by Cargo
if [ -f "runtime/target/release/techscript" ]; then
mv runtime/target/release/techscript ${{ matrix.asset_name }}
else
mv runtime/target/release/tech ${{ matrix.asset_name }}
fi
chmod +x ${{ matrix.asset_name }}
fi
- name: Upload Release Assets
uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.asset_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}