-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.57 KB
/
release.yaml
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
name: Release
on:
push:
branches-ignore:
- '**'
tags:
- '*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nim
uses: iffy/[email protected]
- name: Install nimxc
run: |
nimble install -y https://github.com/iffy/nimxc.git
- name: Build Linux
run: |
nimble build -r -d:release --opt:size
mv build/lodns{,-linux-amd64}
# - name: Build Darwin
# run: |
# nimxc c --target=macosx-arm64 -d:release -d:NimblePkgVersion:$(nimble --silent version) --opt:size --out:./build/lodns-darwin-arm64 -f src/lodns.nim
# nimxc c --target=macosx-amd64 -d:release -d:NimblePkgVersion:$(nimble --silent version) --opt:size --out:./build/lodns-darwin-amd64 -f src/lodns.nim
- name: Build Windows
run: |
nimxc c --target=windows-amd64 -d:release -d:NimblePkgVersion:$(nimble --silent version) --opt:size --out:./build/lodns-windows-amd64.exe -f src/lodns.nim
- name: Create packages
run: |
tar czf ./build/lodns-linux-amd64.tar.gz --directory=./build lodns-linux-amd64
# tar czf ./build/lodns-darwin-amd64.tar.gz --directory=./build lodns-darwin-amd64
# tar czf ./build/lodns-darwin-arm64.tar.gz --directory=./build lodns-darwin-arm64
7z a ./build/lodns-windows-amd64.zip ./build/lodns-windows-amd64.exe
- name: Publish release
uses: softprops/action-gh-release@v1
if: success()
with:
files: build/*