Skip to content

Commit 7c5c05c

Browse files
committed
v1.0.0
1 parent ceac1fe commit 7c5c05c

14 files changed

Lines changed: 1043 additions & 297 deletions

File tree

.github/workflows/release.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
name: build ${{ matrix.target }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
target: x86_64-unknown-linux-gnu
20+
binary: sinbo
21+
asset_name: sinbo-linux-x86_64
22+
23+
- os: macos-latest
24+
target: x86_64-apple-darwin
25+
binary: sinbo
26+
asset_name: sinbo-macos-x86_64
27+
28+
- os: macos-latest
29+
target: aarch64-apple-darwin
30+
binary: sinbo
31+
asset_name: sinbo-macos-aarch64
32+
33+
- os: windows-latest
34+
target: x86_64-pc-windows-msvc
35+
binary: sinbo.exe
36+
asset_name: sinbo-windows-x86_64.exe
37+
38+
steps:
39+
- uses: actions/checkout@v6
40+
41+
- name: Install Rust
42+
uses: actions-rust-lang/setup-rust-toolchain@v1
43+
with:
44+
toolchain: stable
45+
target: ${{ matrix.target }}
46+
47+
- name: Build
48+
run: cargo build --release --target ${{ matrix.target }}
49+
50+
- name: Rename binary (Linux/macOS)
51+
if: matrix.os != 'windows-latest'
52+
run: cp target/${{ matrix.target }}/release/${{ matrix.binary }} ${{ matrix.asset_name }}
53+
54+
- name: Rename binary (Windows)
55+
if: matrix.os == 'windows-latest'
56+
run: Copy-Item target/${{ matrix.target }}/release/${{ matrix.binary }} ${{ matrix.asset_name }}
57+
58+
- name: Upload artifact
59+
uses: actions/upload-artifact@v7
60+
with:
61+
name: ${{ matrix.asset_name }}
62+
path: ${{ matrix.asset_name }}
63+
64+
release:
65+
needs: build
66+
runs-on: ubuntu-latest
67+
permissions:
68+
contents: write
69+
steps:
70+
- uses: actions/checkout@v6
71+
72+
- name: Download artifacts
73+
uses: actions/download-artifact@v8
74+
with:
75+
path: artifacts
76+
merge-multiple: true
77+
78+
- name: Create GitHub release
79+
uses: softprops/action-gh-release@v2
80+
with:
81+
files: artifacts/*
82+
generate_release_notes: true
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
15+
- name: Install Rust
16+
uses: actions-rust-lang/setup-rust-toolchain@v1
17+
with:
18+
toolchain: stable
19+
20+
- name: Format check
21+
run: cargo fmt --check
22+
23+
- name: Clippy
24+
run: cargo clippy -- -D warnings
25+
26+
- name: Check
27+
run: cargo check
28+
29+
- name: Test
30+
run: cargo test

.gitignore

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

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"cSpell.words": [
3-
"sinbo"
3+
"arboard",
4+
"nvim",
5+
"sinbo",
6+
"subl"
47
]
58
}

0 commit comments

Comments
 (0)