-
Notifications
You must be signed in to change notification settings - Fork 10
54 lines (43 loc) · 1.5 KB
/
build-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
# This is a basic workflow to help you get started with Actions
name: Build Release
env:
APP_NAME: spyglass.py
PKG_NAME: Spyglass
# Controls when the workflow will run
on: release
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: macos-latest
name: macOS
extension: intel
- os: ubuntu-latest
name: linux-amd64
extension: bin
- os: windows-latest
name: windows
extension: exe
steps:
# Runs a set of commands using the runners shell
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Build with pyInstaller
run: |
echo "Building ${{ env.PKG_NAME }}-${{ github.ref_name }}-${{ matrix.name }}.${{ matrix.extension }}"
pip install -r requirements.txt
pip install pyinstaller
pyinstaller --onefile --console --name ${{ env.PKG_NAME }}-${{ github.ref_name }}-${{ matrix.name }}.${{ matrix.extension }} ${{ env.APP_NAME }}
- name: Push Release
uses: softprops/action-gh-release@v1
with:
files: dist/${{ env.PKG_NAME }}-${{ github.ref_name }}-${{ matrix.name }}.${{ matrix.extension }}