-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (65 loc) · 2.68 KB
/
build-pyinstall.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
name: Build PyInstall
# Based on https://github.com/sayyid5416/pyinstaller
on:
push:
pull_request:
schedule:
# * is a special character in YAML so you have to quote this string
# Run at 06:21 UTC on the 8th of every month (odd time to reduce load)
- cron: '21 06 8 * *'
workflow_dispatch:
# To limit to "main" branch, add to above...
# branches: [ "main" ]
# Get git tag info via GitHub API due to shallow clone:
# See...
# https://github.com/marketplace/actions/gh-describe
# Alongside these resources, not used here:
# https://stackoverflow.com/questions/66349002/get-latest-tag-git-describe-tags-when-repo-is-cloned-with-depth-1
# https://dev.to/hectorleiva/github-actions-and-creating-a-short-sha-hash-8b7
jobs:
pyinstall-windows:
runs-on: windows-latest
steps:
- name: Git describe
id: ghd
uses: proudust/gh-describe@v2
with:
default: "notags-${{ github.sha }}"
- name: Check outputs
run: |
echo "describe : ${{ steps.ghd.outputs.describe }}"
echo "tag : ${{ steps.ghd.outputs.tag }}"
echo "distance : ${{ steps.ghd.outputs.distance }}"
echo "sha : ${{ steps.ghd.outputs.sha }}"
echo "short-sha : ${{ steps.ghd.outputs.short-sha }}"
- name: Build executable
uses: sayyid5416/pyinstaller@v1
with:
spec: 'hapticpancake.spec'
requirements: 'BridgeApp/requirements.txt'
upload_exe_with_name: 'hapticpancake_windows_${{ steps.ghd.outputs.describe }}'
# options: --onefile, --windowed, --collect-all openvr, --name "hapticpancake", --icon=Images\icon.ico
# These options are not used when passing in a .spec file
pyinstall-linux:
runs-on: ubuntu-latest
steps:
- name: Git describe
id: ghd
uses: proudust/gh-describe@v2
with:
default: "notags-${{ github.sha }}"
- name: Check outputs
run: |
echo "describe : ${{ steps.ghd.outputs.describe }}"
echo "tag : ${{ steps.ghd.outputs.tag }}"
echo "distance : ${{ steps.ghd.outputs.distance }}"
echo "sha : ${{ steps.ghd.outputs.sha }}"
echo "short-sha : ${{ steps.ghd.outputs.short-sha }}"
- name: Build executable
uses: sayyid5416/pyinstaller@v1
with:
spec: 'hapticpancake.spec'
requirements: 'BridgeApp/requirements.txt'
upload_exe_with_name: 'hapticpancake_linux_${{ steps.ghd.outputs.describe }}'
# options: --onefile, --windowed, --collect-all openvr, --name "hapticpancake", --icon=Images\icon.ico
# These options are not used when passing in a .spec file