-
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (76 loc) · 2.26 KB
/
make-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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: "Build Release"
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
#schedule:
# - cron: '0 0 * * *' # end of each day (nightlies!)
release:
types:
- created
jobs:
################################
# Normal release version #
################################
build_mac:
name: Build macOS binary
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Build
run: |
make CC=g++-10 linux
mv therionsurface2survex therionsurface2survex-macOS
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: macEXE
path: therionsurface2survex-macOS
retention-days: 1
build_release_package:
name: Build release package
runs-on: ubuntu-latest
needs: build_mac
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Setup C++
run: |
sudo apt-get install mingw-w64 mingw-w64-common build-essential
- name: Build release (linux, windows)
run: |
make release
- name: Get release version
run: |
echo "VERSION=$(make showVer |grep VERSION: |cut -d':' -f2)" >> $GITHUB_ENV
echo "SHASHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Download macExe from previous job
uses: actions/download-artifact@v2
with:
name: macEXE
- name: Add macEXE to release files
run: |
ls -alh
mkdir dist
cd dist
echo "VERSION: ${VERSION}"
tar -xzvf ../therionsurface2survex-${VERSION}.tar.gz
cp ../therionsurface2survex-macOS therionsurface2survex-${VERSION}/
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: therionsurface2survex-${{env.VERSION}}
path: dist
retention-days: 7