-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (79 loc) · 2.51 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
name: Release
on:
push:
tags:
- 'v*'
jobs:
make_release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.step_upload_url.outputs.upload_url }}
steps:
- name: Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
- id: step_upload_url
run: echo "::set-output name=upload_url::${{ steps.create_release.outputs.upload_url }}"
build_windows:
runs-on: windows-latest
needs: make_release
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Build
run: |
poetry run pyinstaller --onefile --noconsole --name Spectrominer ./spectrominer/ui/app.py
- name: Upload release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.make_release.outputs.upload_url }}
asset_path: .\dist\spectrominer.exe
asset_name: spectrominer.exe
asset_content_type: application/octet-stream
build_macos:
runs-on: macos-latest
needs: make_release
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Build
run: |
poetry run pyinstaller --windowed --name spectrominer ./spectrominer/ui/app.py
cd ./dist/
zip -r ./spectrominer.app.zip ./spectrominer.app -x "*.DS_Store"
- name: Upload release assets
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.make_release.outputs.upload_url }}
asset_path: ./dist/spectrominer.app.zip
asset_name: spectrominer.app.zip
asset_content_type: application/octet-stream