FreeDATA/.github/workflows/build-tnc.yml

68 lines
1.8 KiB
YAML
Raw Normal View History

2021-08-13 19:27:39 +00:00
name: Build
2021-08-13 19:17:15 +00:00
2021-08-13 19:27:39 +00:00
on:
push:
2021-08-13 19:29:37 +00:00
# tags:
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
2021-08-13 19:17:15 +00:00
jobs:
2021-08-13 19:24:26 +00:00
2021-08-13 19:27:39 +00:00
createrelease:
name: Create Release
runs-on: [ubuntu-latest]
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- name: Save Release URL File for publish
uses: actions/upload-artifact@v1
with:
name: release_url
path: release_url.txt
build:
name: Build packages
needs: createrelease
runs-on: ${{ matrix.os }}
2021-08-13 19:17:15 +00:00
strategy:
matrix:
2021-08-13 19:27:39 +00:00
include:
- os: macos-latest
TARGET: macos
CMD_BUILD: >
pyinstaller -F -w -n daemon daemon.py &&
cd dist/ &&
zip -r9 daemon daemon.app/
OUT_FILE_NAME: daemon.zip
ASSET_MIME: application/zip
- os: windows-latest
TARGET: windows
CMD_BUILD: pyinstaller -F -w -n daemon daemon.py
OUT_FILE_NAME: daemon.exe
ASSET_MIME: application/vnd.microsoft.portable-executable
2021-08-13 19:19:02 +00:00
steps:
2021-08-13 19:27:39 +00:00
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
2021-08-13 19:34:01 +00:00
pip3 install pyaudio
pip3 install psutil
pip3 install crcengine
pip3 install threading
2021-08-13 19:27:39 +00:00
- name: Build with pyinstaller for ${{matrix.TARGET}}
run: ${{matrix.CMD_BUILD}}
2021-08-13 19:37:10 +00:00