-
Notifications
You must be signed in to change notification settings - Fork 10
66 lines (63 loc) · 2.09 KB
/
release.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
name: Release
on:
workflow_dispatch:
inputs:
tag:
description: "Specify tag to create"
required: true
env:
CARGO_TERM_COLOR: always
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-pc-windows-gnu
- name: Install Rust Windows target
run: |
sudo apt-get update
sudo apt-get install binutils-mingw-w64 mingw-w64
- name: Build Linux
run: |
cargo build --release
mv target/release/dynasty ./dynasty_x86_64-unknown-linux-gnu
- name: Build Windows
run: |
cargo build --release --target x86_64-pc-windows-gnu
mv target/x86_64-pc-windows-gnu/release/dynasty.exe ./dynasty_x86_64-pc-windows-gnu.exe
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.tag }}
files: |
dynasty_x86_64-unknown-linux-gnu
dynasty_x86_64-pc-windows-gnu.exe
macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
targets: aarch64-apple-darwin
- name: Install cargo-bundle
run: |
cargo install cargo-bundle
- name: Build
run: |
cargo bundle --release --target=x86_64-apple-darwin
cargo bundle --release --target=aarch64-apple-darwin
- name: Create DMG
run: |
git clone https://github.com/create-dmg/create-dmg --depth 1
chmod u+x create-dmg/create-dmg
./create-dmg/create-dmg Dynasty_aarch64-apple-darwin.dmg target/aarch64-apple-darwin/release/bundle/osx/Dynasty.app
./create-dmg/create-dmg Dynasty_x86_64-apple-darwin.dmg target/release/bundle/osx/Dynasty.app
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.tag }}
files: |
Dynasty_aarch64-apple-darwin.dmg
Dynasty_x86_64-apple-darwin.dmg