-
-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (60 loc) · 1.86 KB
/
build.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
name: Build
on: [push]
jobs:
upload-release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build-linux-windows, build-macos]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: renkit
- name: Create Release
uses: softprops/action-gh-release@v0.1.15
with:
files: '*.tar.gz'
build-linux-windows:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install Nim and Dependencies
run: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y curl xz-utils g++ git mingw-w64 libarchive-tools
curl https://nim-lang.org/choosenim/init.sh -sSf | bash -s -- -y
- name: Build Project
run: |
export PATH=/home/runner/.nimble/bin:$PATH
nimble -y build_linux_amd64
nimble -y build_windows_amd64
- name: Archive Artifacts
run: |
tar czf renkit-linux-amd64.tar.gz -C bin/amd64/linux/ .
tar czf renkit-windows-amd64.tar.gz -C bin/amd64/windows/ .
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: renkit
path: '*.tar.gz'
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install Nim
run: |
brew install nim
- name: Build Project
run: |
nimble -y build_macos_amd64
nimble -y build_macos_arm64
- name: Archive Artifacts
run: |
tar czf renkit-macos-amd64.tar.gz -C bin/amd64/macos/ .
tar czf renkit-macos-arm64.tar.gz -C bin/arm64/macos/ .
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: renkit
path: '*.tar.gz'