Skip to content

Commit fc3683a

Browse files
chore: Create github actions workflow to build binaries and upload it to github release
1 parent 4705f47 commit fc3683a

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
4+
on:
5+
push:
6+
tags:
7+
- "v*.*.*" # Only run on version tags like v1.0.0
8+
9+
jobs:
10+
build:
11+
name: Build binaries
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Install Rust
22+
uses: dtolnay/rust-toolchain@stable
23+
24+
- name: Build release binary
25+
run: cargo build --release --workspace
26+
27+
- name: Upload binaries as artifacts
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: null-talk-${{ matrix.os }}
31+
path: |
32+
target/release/null-talk-client*
33+
target/release/null-talk-server*
34+
35+
release:
36+
name: Upload to GitHub Releases
37+
needs: build
38+
runs-on: ubuntu-latest
39+
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
44+
- name: Download build artifacts
45+
uses: actions/download-artifact@v4
46+
with:
47+
path: ./artifacts
48+
49+
- name: Upload release assets
50+
uses: softprops/action-gh-release@v2
51+
if: startsWith(github.ref, 'refs/tags/')
52+
with:
53+
files: |
54+
artifacts/**/*

0 commit comments

Comments
 (0)