-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 938 Bytes
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Rust
on:
push:
branches: [ "main" ]
tags:
- 'v*' # Create a release only for tag start with v.
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Build (Release Mode)
run: cargo build --release --verbose
- name: Run tests (Release Mode)
run: cargo test --release --verbose
- name: Archive build output
run: tar -czf copper_server.tar.gz -C target/release server
# Remplace "my_minecraft_server" par le nom de ton binaire
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: copper_server.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}