Merge branch 'master' of ssh://github.com/soraxas/echo360 #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Standalone build with Pyinstaller | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
# necessary because pyinstaller does not work when entry has the same | |
# name as the python package | |
- name: setup entrypoint for pyinstaller | |
run: mv echo360.py entrypoint.py | |
# - name: Package Application | |
# uses: JackMcKew/pyinstaller-action-linux@main | |
# with: | |
# path: . | |
# we are directly executing commands because GH action pyinstaller (somehow) | |
# doesn't have _curse (import problem) | |
- name: Linux PyInstaller | |
run: pip install -r requirements.txt && pip install pyinstaller && python -m PyInstaller echo360.spec | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: echo360-linux | |
path: dist/echo360 | |
#path: dist/linux/echo360 | |
- name: add window-curse to window build | |
run: echo windows-curses >> requirements.txt | |
- name: Windows PyInstaller | |
uses: JackMcKew/pyinstaller-action-windows@main | |
with: | |
path: . | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: echo360-window | |
path: dist/windows/echo360.exe | |
############################################# | |
- name: Set outputs | |
id: vars | |
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | |
- name: Check outputs | |
run: echo ${{ steps.vars.outputs.sha_short }} | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.vars.outputs.sha_short }} | |
release_name: "Standalone echo360 executable (SHA: ${{ steps.vars.outputs.sha_short }})" | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset Linux | |
# id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/echo360 | |
asset_name: echo360-linux | |
asset_content_type: application/octet-stream | |
- name: Upload Release Asset | |
# id: upload-release-asset windows | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: dist/windows/echo360.exe | |
asset_name: echo360-windows.exe | |
asset_content_type: application/octet-stream |