forked from Putnam3145/auxmos
-
Notifications
You must be signed in to change notification settings - Fork 7
77 lines (68 loc) · 2.39 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
67
68
69
70
71
72
73
74
75
76
77
name: Build Release
on:
release:
types: [published]
jobs:
release:
name: Build and Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target_name: i686-unknown-linux-gnu
artifact_name: libauxmos.so
- os: windows-latest
target_name: i686-pc-windows-msvc
artifact_name: auxmos.dll
debug_pdb_name: auxmos.pdb
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Toolchains (Windows)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: i686-pc-windows-msvc
if: matrix.os == 'windows-latest'
- name: Install g++ multilib
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install build-essential g++-multilib libc6-i386 libstdc++6:i386
if: matrix.os == 'ubuntu-latest'
- name: Setup Toolchains (Ubuntu)
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: i686-unknown-linux-gnu
if: matrix.os == 'ubuntu-latest'
- name: Build auxmos (Windows)
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: build
args: --target i686-pc-windows-msvc --release --features "all_reaction_hooks katmos"
if: matrix.os == 'windows-latest'
- name: Build auxmos (Ubuntu)
uses: actions-rs/cargo@v1
with:
toolchain: stable
command: build
args: --target i686-unknown-linux-gnu --release --features "generic_fire_hook katmos"
if: matrix.os == 'ubuntu-latest'
- name: Upload binary to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target_name }}/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.artifact_name }}
tag: ${{ github.ref }}
- name: Upload debug informations to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target_name }}/release/${{ matrix.debug_pdb_name }}
asset_name: ${{ matrix.debug_pdb_name }}
tag: ${{ github.ref }}
if: matrix.os == 'windows-latest'