Skip to content

Commit 436c175

Browse files
committed
🎉: create CLI project
0 parents  commit 436c175

13 files changed

Lines changed: 1529 additions & 0 deletions

File tree

.github/static/Logo.png

7.42 KB
Loading

.github/static/Logo.svg

Lines changed: 1 addition & 0 deletions
Loading

.github/workflows/build.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
workflow_dispatch:
8+
9+
permissions: write-all
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest]
16+
fail-fast: false
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Setup Rust
25+
uses: dtolnay/rust-toolchain@stable
26+
27+
- name: Cache Cargo
28+
uses: actions/cache@v2
29+
with:
30+
path: ~/.cargo
31+
key: ${{ matrix.os }}-cargo
32+
33+
- name: Build
34+
run: cargo build --release
35+
36+
- name: Upload Artifact
37+
uses: actions/upload-artifact@v3
38+
with:
39+
name: cli-${{ matrix.os }}
40+
path: target/release/${{ matrix.os == 'windows-latest' && 'lecturecut.exe' || 'lecturecut' }}
41+
42+
release:
43+
needs: build
44+
if: startsWith(github.ref, 'refs/tags/v')
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Download Artifacts
48+
uses: actions/download-artifact@v3
49+
50+
- name: Release
51+
uses: softprops/action-gh-release@v1
52+
with:
53+
files: |
54+
./cli-windows-latest/lecturecut.exe
55+
./cli-ubuntu-latest/lecturecut
56+
draft: false
57+
prerelease: false

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target/

0 commit comments

Comments
 (0)