-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.29 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (47 loc) · 1.29 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
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., v0.1.0)'
required: true
default: 'v0.1.0'
jobs:
build:
name: Build for ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
name: unsafetodo-linux-x64
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Install dependencies (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev pkg-config
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ matrix.target }}
- name: Prepare binary
run: |
cp target/${{ matrix.target }}/release/unsafetodo ${{ matrix.name }}
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
with:
files: ${{ matrix.name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}