-
Notifications
You must be signed in to change notification settings - Fork 6
67 lines (55 loc) · 1.93 KB
/
release_cli.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Create CLI Release
on:
workflow_dispatch:
jobs:
release:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install Deb Generator
if: matrix.platform == 'ubuntu-20.04'
run: cargo install cargo-deb
- name: Build CLI
run: cargo build -p owmods_cli --release
env:
ANALYTICS_API_KEY: ${{ secrets.ANALYTICS_API_KEY }}
- name: Get Version
id: get_version
run: echo "version=$(cargo run -q -p owmods_cli --release --bin=owmods version)" >> $GITHUB_OUTPUT
- name: Generate Dist Folder
if: matrix.platform == 'ubuntu-20.04'
run: cargo xtask dist_cli
- name: Archive Dist Files
if: matrix.platform == 'ubuntu-20.04'
run: tar --zstd -cfowmods.tar.zst -C target/release owmods -C ../../dist/cli/ man completions
- name: Generate Deb File
if: matrix.platform == 'ubuntu-20.04'
run: cargo deb -p owmods_cli
env:
ANALYTICS_API_KEY: ${{ secrets.ANALYTICS_API_KEY }}
- name: Upload CLI
uses: softprops/action-gh-release@v1
with:
name: Outer Wilds Mod Manager CLI Version ${{ steps.get_version.outputs.version }}
tag_name: cli_v${{ steps.get_version.outputs.version }}
fail_on_unmatched_files: false
generate_release_notes: false
draft: true
files: |
owmods.tar.zst
target/debian/owmods-cli_${{ steps.get_version.outputs.version }}_amd64.deb
target/release/owmods
target/release/owmods.exe