Skip to content

Commit 956f4ce

Browse files
authored
Create build-and-release.yml
1 parent c8091ed commit 956f4ce

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build & Release on Tag
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
build-and-release:
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v5
12+
13+
- uses: dtolnay/rust-toolchain@master
14+
with:
15+
toolchain: stable
16+
17+
- uses: Swatinem/rust-cache@v2
18+
with:
19+
key: stable
20+
21+
- name: Build release
22+
run: cargo build --release
23+
24+
- name: Upload release binary as artifact
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: extract-audio
28+
path: target/release/extract-audio
29+
30+
- name: Create GitHub Release & Upload Asset
31+
uses: softprops/action-gh-release@v2
32+
with:
33+
files: target/release/extract-audio
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+

0 commit comments

Comments
 (0)