-
-
Notifications
You must be signed in to change notification settings - Fork 5
71 lines (60 loc) · 1.76 KB
/
Binary.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
name: Binary
on:
push:
tags:
- "*.*.*"
jobs:
publish:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
use-cross: false
binary_ext: ".exe"
- os: macos-latest
target: x86_64-apple-darwin
use-cross: false
strip: strip
- os: macos-latest
target: aarch64-apple-darwin
use-cross: false
strip: strip
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Build
shell: bash
run: |
cd three_body_e2021; cargo build --target ${{ matrix.target }} --release
- name: Strip binary
if: matrix.strip
run: ${{ matrix.strip }} target/${{ matrix.target }}/release/3body
- name: "Compress binaries"
if: true
uses: master-atul/tar-action@v1.0.2
with:
command: c
cwd: "./target/${{ matrix.target }}/release"
files: "3body"
outPath: "3body-${{ matrix.target }}${{ matrix.binary_ext }}.tar.gz"
- name: "Release binaries"
uses: pragmatrix/release-action@exp
with:
owner: rustq
repo: 3body-lang
tag: ${{ env.RELEASE_VERSION }}
allowUpdates: true
replacesArtifacts: true
artifacts: "3body-${{ matrix.target }}${{ matrix.binary_ext }}.tar.gz"
artifactErrorsFailBuild: true
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true