Skip to content

Commit 8406cb7

Browse files
committed
v1.0.0 initial release
0 parents  commit 8406cb7

28 files changed

+4220
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Cargo.lock text eol=lf

.github/workflows/release.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
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.runner }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- target: x86_64-apple-darwin
20+
runner: macos-latest
21+
asset_name: dstimer-macos-x86_64
22+
23+
- target: aarch64-apple-darwin
24+
runner: macos-latest
25+
asset_name: dstimer-macos-aarch64
26+
27+
- target: x86_64-unknown-linux-gnu
28+
runner: ubuntu-latest
29+
asset_name: dstimer-linux-x86_64
30+
31+
- target: aarch64-unknown-linux-gnu
32+
runner: ubuntu-latest
33+
asset_name: dstimer-linux-aarch64
34+
use_cross: true
35+
36+
- target: x86_64-pc-windows-msvc
37+
runner: windows-latest
38+
asset_name: dstimer-windows-x86_64.exe
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Install Rust toolchain
44+
uses: dtolnay/rust-toolchain@stable
45+
with:
46+
targets: ${{ matrix.target }}
47+
48+
- name: Install ALSA dev libraries (Linux x86_64)
49+
if: matrix.target == 'x86_64-unknown-linux-gnu'
50+
run: sudo apt-get update && sudo apt-get install -y libasound2-dev pkg-config
51+
52+
- name: Install cross (Linux aarch64)
53+
if: matrix.use_cross == true
54+
uses: taiki-e/install-action@cross
55+
56+
- name: Build (cross)
57+
if: matrix.use_cross == true
58+
run: cross build --release --target ${{ matrix.target }}
59+
60+
- name: Build (cargo)
61+
if: matrix.use_cross != true
62+
run: cargo build --release --target ${{ matrix.target }}
63+
64+
- name: Rename binary (Unix)
65+
if: matrix.runner != 'windows-latest'
66+
run: cp target/${{ matrix.target }}/release/dstimer ${{ matrix.asset_name }}
67+
68+
- name: Rename binary (Windows)
69+
if: matrix.runner == 'windows-latest'
70+
run: cp target/${{ matrix.target }}/release/dstimer.exe ${{ matrix.asset_name }}
71+
72+
- name: Upload artifact
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: ${{ matrix.asset_name }}
76+
path: ${{ matrix.asset_name }}
77+
78+
release:
79+
name: Create GitHub Release
80+
needs: build
81+
runs-on: ubuntu-latest
82+
steps:
83+
- uses: actions/download-artifact@v4
84+
with:
85+
path: artifacts
86+
merge-multiple: true
87+
88+
- name: Create release and upload assets
89+
uses: softprops/action-gh-release@v2
90+
with:
91+
files: artifacts/*
92+
generate_release_notes: true

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/target/
2+
**/*.rs.bk
3+
*.pdb
4+
.idea/
5+
.vscode/
6+
.vs/*
7+
!.vs/tasks.vs.json
8+
*.swp
9+
*.swo
10+
*~
11+
.DS_Store
12+
*.profraw
13+
*.profdata
14+
.env
15+
.env.local
16+
**/*.bak

.vs/tasks.vs.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": "0.2.1",
3+
"tasks": [
4+
{
5+
"taskLabel": "Build + Run with cargo",
6+
"appliesTo": "src/main.rs",
7+
"type": "launch",
8+
"command": "cmd.exe",
9+
"args": [
10+
"cargo",
11+
"build && start target\\debug\\dstimer.exe"
12+
]
13+
},
14+
{
15+
"taskLabel": "task-dead-simple-cli-timer",
16+
"appliesTo": "/",
17+
"type": "launch"
18+
}
19+
]
20+
}

0 commit comments

Comments
 (0)