-
Notifications
You must be signed in to change notification settings - Fork 8
85 lines (81 loc) · 2.88 KB
/
release_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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# This workflow will automatically upload a binary artifact when a release/tag is created
name: Build and upload binary
on:
# allow to build manually
workflow_dispatch:
# build automatically when pushing a tag
push:
branches:
- "!*"
tags:
- "v*"
jobs:
# ----------------------------------------------------------------------------
# this will checkout and build nim stable from gh repository on manylinux2014 / CentOS 7
build-linux:
runs-on: ubuntu-latest
container:
image: quay.io/pypa/manylinux2014_x86_64
steps:
- uses: actions/checkout@v2
- name: Build binary
run: |
STABLE_NIM=`curl -sSL http://nim-lang.org/channels/stable | xargs`
curl -O https://nim-lang.org/download/nim-$STABLE_NIM-linux_x64.tar.xz
tar -xvJf nim-$STABLE_NIM-linux_x64.tar.xz
NIMPATH=`pwd`/nim-$STABLE_NIM-linux_x64/bin
PATH=$PATH:$NIMPATH
# compile choosenim
cd $CHOOSENIM_DIR
nimble install -y
nimble build --path:$NIMPATH
ls bin/*
- name: Upload binaries to release/tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
overwrite: true
tag: ${{ github.ref }}
asset_name: choosenim-manylinux2014
file: ${{ runner.workspace }}/choosenim/bin/choosenim
# ----------------------------------------------------------------------------
# this uses choosenim by itself - you may need to build manually if you break choosenim
build-win32:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: iffy/[email protected]
- name: Build binary
run: |
nimble install -y
nimble build
dir bin/*
- name: Upload binaries to release/tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
overwrite: true
tag: ${{ github.ref }}
asset_name: choosenim-windows
file: ${{ runner.workspace }}/choosenim/bin/choosenim.exe
# ----------------------------------------------------------------------------
# this uses choosenim by itself - you may need to build manually if you break choosenim
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: iffy/[email protected]
- name: Build binary
run: |
git config --global --add safe.directory /__w/choosenim/choosenim
nimble install -y
nimble build
ls bin/*
- name: Upload binaries to release/tag
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
overwrite: true
tag: ${{ github.ref }}
asset_name: choosenim-macos
file: ${{ runner.workspace }}/choosenim/bin/choosenim