-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (71 loc) · 2.2 KB
/
build_and_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
name: Build and Release
on:
repository_dispatch:
types: [ release ]
jobs:
build:
strategy:
matrix:
os: [macos-latest, windows-latest]
node-version: [16.x]
runs-on: ${{ matrix.os }}
steps:
- run: echo ${{github.event.client_payload.version}}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Creating Private Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Node and Webpack
run: |
cd minerva_analysis
cd client
npm install
npm run start
rm -r node_modules
cd ..
cd ..
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.9
environment-file: requirements.yml
activate-environment: minerva_analysis
auto-activate-base: false
- name: Package Windows
if: startsWith(matrix.os,'windows')
shell: cmd /C CALL {0}
run: |
package_win.bat
- name: Rename Windows
if: startsWith(matrix.os,'windows')
shell: bash -l {0}
run: |
ls dist/
mv dist/minerva_analysis_windows.exe "dist/Gater_Windows_${{github.event.client_payload.version}}.exe"
ls dist/
- name: Package Mac
if: startsWith(matrix.os,'mac')
shell: bash -l {0}
run: |
./package_mac.sh Gater_Mac_${{github.event.client_payload.version}}
- name: Rename Mac
if: startsWith(matrix.os,'mac')
shell: bash -l {0}
run: |
cd dist
zip "Gater_Mac_${{github.event.client_payload.version}}.zip" "Gater_Mac_${{github.event.client_payload.version}}"
rm "Gater_Mac_${{github.event.client_payload.version}}"
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.client_payload.version }}
files: |
dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}