-
Notifications
You must be signed in to change notification settings - Fork 2
114 lines (90 loc) · 3.08 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
env:
BUILD_TYPE: Release
jobs:
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get dependencies
run: sudo apt-get install -y build-essential cmake libwxgtk3.0-gtk3-dev imagemagick
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Package
working-directory: ${{github.workspace}}/build
run: cpack
- uses: actions/upload-artifact@v3
with:
name: GOODF-${{github.ref_name}}-linux
path: ${{github.workspace}}/build/GOODF*.tar.gz
build-cross-windows:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Cache wxCrossbuild
id: cache-wxcross
uses: actions/cache@v3
with:
path: ${{github.workspace}}/wxCross
key: wxCrossbuild
- name: Get dependencies
run: sudo apt-get install -y wget build-essential cmake pkg-config libwxgtk3.0-gtk3-dev gcc-mingw-w64-i686 g++-mingw-w64-i686 imagemagick
- name: Cross compile wxWidgets
if: steps.cache-wxcross.outputs.cache-hit != 'true'
run: |
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.2.1/wxWidgets-3.2.2.1.tar.bz2
tar -xf wxWidgets-3.2.2.1.tar.bz2
mkdir wxCross
cd wxWidgets-3.2.2.1
mkdir win-ur-static
cd win-ur-static
../configure --host=i686-w64-mingw32 --build=i686-linux --prefix=${{github.workspace}}/wxCross --enable-unicode --disable-shared
make
make install
cd ..
cd ..
- name: Configure CMake
run: cmake -B ${{github.workspace}}/crossbuild -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=toolchain.def
- name: Build
run: cmake --build ${{github.workspace}}/crossbuild --config ${{env.BUILD_TYPE}}
- name: Package
working-directory: ${{github.workspace}}/crossbuild
run: cpack
- uses: actions/upload-artifact@v3
with:
name: GOODF-${{github.ref_name}}-windows
path: ${{github.workspace}}/crossbuild/GOODF*.zip
release:
needs: [ build-linux, build-cross-windows ]
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: GOODF-${{github.ref_name}}-linux
- uses: actions/download-artifact@v3
with:
name: GOODF-${{github.ref_name}}-windows
- name: Remove Starting v From Tag
id: remove_v
run: |
TAG=${{github.ref_name}}
echo "release_version=${TAG#v}" >> $GITHUB_ENV
- name: Populate Release
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
body: Relsease files created from GitHub action runners.
files: |
GOODF-${{env.release_version}}-linux.x86_64.tar.gz
GOODF-${{env.release_version}}-windows.x86.zip