-
Notifications
You must be signed in to change notification settings - Fork 6
85 lines (85 loc) · 2.55 KB
/
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
74
75
76
77
78
79
80
81
82
83
84
85
name: Release
on:
push:
tags:
- '*'
jobs:
build:
strategy:
matrix:
os: [ macos-latest, windows-latest ]
node-version: [ 16.x ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get Branch
shell: bash -l {0}
run: |
raw=$(git branch -r --contains ${{ github.ref }})
branch=${raw##*/}
echo "BRANCH=$branch" >> $GITHUB_ENV
- run: echo ${{ env.BRANCH }}
- name: Creating Private Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Create Repository Dispatch
if: startsWith(matrix.os,'mac')
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GATING_PAT }}
repository: labsyspharm/gater
event-type: merge
client-payload: '{"ref": "${{ github.ref }}"}'
- 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@v2
with:
python-version: 3.9
environment-file: requirements.yml
activate-environment: minerva_analysis
- 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/minerva_analysis_windows_${{ env.BRANCH }}.exe"
ls dist/
- name: Package Mac
if: startsWith(matrix.os,'mac')
shell: bash -l {0}
run: |
./package_mac.sh minerva_analysis_mac_${{ env.BRANCH }}
- name: Rename Mac
if: startsWith(matrix.os,'mac')
shell: bash -l {0}
run: |
cd dist
zip "minerva_analysis_mac_${{ env.BRANCH }}.zip" "minerva_analysis_mac_${{ env.BRANCH }}"
rm "minerva_analysis_mac_${{ env.BRANCH }}"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}