-
Notifications
You must be signed in to change notification settings - Fork 3
101 lines (96 loc) · 2.99 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
on:
push:
branches: [ main ]
workflow_dispatch:
name: Release on GitHub
jobs:
Version_Bumped:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.master_version_bumped.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Master version bumped
id: master_version_bumped
shell: bash -l {0}
run: |
cd misc
. ./check_version.sh
echo "version=$current_version" >> $GITHUB_OUTPUT
Create_Draft_On_GitHub:
runs-on: ubuntu-latest
needs: Version_Bumped
outputs:
upload_url: ${{ steps.draft_release.outputs.upload_url }}
steps:
- name: Draft Release
id: draft_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ needs.Version_Bumped.outputs.version }}
release_name: v${{ needs.Version_Bumped.outputs.version }}
draft: true
prerelease: false
Create_MacOS_GUI:
runs-on: macos-latest
needs: [Create_Draft_On_GitHub, Version_Bumped]
steps:
- name : Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
- name: Install dependencies
run: |
cd gui
npm install
- name: Build GUI
run: |
cd gui
npm run make
- name: List output files
run: |
ls gui/out/make/zip/darwin/x64
- name: Upload a Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: gui/out/make/zip/darwin/x64/alphadia-gui-darwin-x64-${{ needs.Version_Bumped.outputs.version }}.zip
asset_name: alphadia-gui-darwin-x64-${{ needs.Version_Bumped.outputs.version }}.zip
asset_content_type: application/zip
Create_Win_GUI:
runs-on: windows-latest
needs: [Create_Draft_On_GitHub, Version_Bumped]
steps:
- name : Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
- name: Install dependencies
run: |
cd gui
npm install
- name: Build GUI
run: |
cd gui
npm run make
- name: List output files
run: |
ls -R gui/out/make
- name: Upload a Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: gui/out/make/zip/win32/x64/alphadia-gui-win32-x64-${{ needs.Version_Bumped.outputs.version }}.zip
asset_name: alphadia-gui-win32-x64-${{ needs.Version_Bumped.outputs.version }}.zip
asset_content_type: application/zip