-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 1.7 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
name: ECOZ2 Rust Release
on:
push:
tags:
- 'v*'
jobs:
build_linux:
runs-on: ubuntu-latest # https://github.com/actions/virtual-environments/issues/1816
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Build linux
run: |
CC=gcc cargo build --verbose --release
cd target/release/
zip "${{github.workspace}}/ecoz2rs-linux.zip" ecoz2
- uses: actions/upload-artifact@v2
with:
name: ecoz2rs-linux.zip
path: "${{github.workspace}}/ecoz2rs-linux.zip"
build_macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Build macos
run: |
CC=gcc-13 cargo build --verbose --release
cd target/release/
zip "${{github.workspace}}/ecoz2rs-macos.zip" ecoz2
- uses: actions/upload-artifact@v2
with:
name: ecoz2rs-macos.zip
path: "${{github.workspace}}/ecoz2rs-macos.zip"
release:
needs: [build_linux, build_macos]
runs-on: macos-latest
steps:
- name: Get linux release
uses: actions/download-artifact@v2
with:
name: ecoz2rs-linux.zip
- name: Get macos release
uses: actions/download-artifact@v2
with:
name: ecoz2rs-macos.zip
- name: Complete release
uses: sondreb/action-release@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
prerelease: true
body: 'This is a pre-release'
name: "Draft Release ${{ github.ref }}"
tag: ${{ github.ref }}
files: "ecoz2rs-linux.zip;ecoz2rs-macos.zip"