-
Notifications
You must be signed in to change notification settings - Fork 0
144 lines (113 loc) · 3.9 KB
/
executables.yml
File metadata and controls
144 lines (113 loc) · 3.9 KB
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: Build installers
on:
push:
tags:
- 'v*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
uses: actions/create-release@v1
id: create_release
with:
tag_name: ${{ github.ref }}
release_name: Version ${{ github.ref }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_win:
name: Build Windows binaries
# first create the release
needs: [release]
# Run on Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install requirements
run: pip install -r requirements.txt
- name: Install pyinstaller
run: pip install pyinstaller
- name: Create executable
run: pyinstaller hydenv/__main__.py --onefile --hidden-import cmath --distpath ./deploy --name hydenv --add-data "hydenv/exercises-js;exercises-js"
- name: Create a tarball
run: tar -cvzf hydenv_win.tar ./deploy
- name: Add executable
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: hydenv_win.tar
asset_name: hydenv_win.tar
asset_content_type: application/x-tar
build_mac:
name: Build MacOs binaries
# first create the release
needs: [release]
# Run on MacOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install requirements
run: pip install -r requirements.txt
- name: Install pyinstaller
run: pip install pyinstaller
- name: Create executable
run: pyinstaller hydenv/__main__.py --onefile --hidden-import cmath --distpath ./deploy --name hydenv --add-data "hydenv/exercises-js:exercises-js"
- name: Create a tarball
run: tar -cvzf hydenv_mac.tar ./deploy
- name: Add executable
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: hydenv_mac.tar
asset_name: hydenv_mac.tar
asset_content_type: application/x-tar
build_linux:
name: Build Linux binaries
# first create the release
needs: [release]
# Run on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install requirements
run: pip install -r requirements.txt
- name: Install pyinstaller
run: pip install pyinstaller
- name: Create executable
run: pyinstaller hydenv/__main__.py --onefile --hidden-import cmath --distpath ./deploy --name hydenv --add-data "hydenv/exercises-js:exercises-js"
- name: Create a tarball
run: tar -cvzf hydenv_linux.tar ./deploy
- name: Add executable
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: hydenv_linux.tar
asset_name: hydenv_linux.tar
asset_content_type: application/x-tar