-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (42 loc) · 1.3 KB
/
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
45
46
47
48
49
50
51
52
53
name: Build
on:
push:
tags:
- "v*.*.*"
pull_request:
tags:
- "v*.*.*"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
override: true
- name: Build binary w/o GUI
run: cargo build --release --no-default-features
- name: Archive w/o GUI
run: cp target/release/gazetteer . && zip -r gazetteer-rs.${{ github.ref_name }}-bin.zip resources/ config.toml gazetteer LICENSE
- name: Build binary w/GUI
run: cargo build --release --features gui
- name: Archive wGUI
run: cp target/release/gazetteer . && zip -r gazetteer-rs.${{ github.ref_name }}-gui-bin.zip resources/ config.toml gazetteer LICENSE
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
gazetteer-rs.${{ github.ref_name }}-bin.zip
gazetteer-rs.${{ github.ref_name }}-gui-bin.zip
gazetteer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update latest tag
uses: EndBug/[email protected]