Files
disco-hue/.github/workflows/main.yaml
2021-08-04 20:55:14 +01:00

60 lines
1.7 KiB
YAML

name: Package Application with Pyinstaller
on:
push:
branches: ["trunk"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Package Application
uses: JackMcKew/pyinstaller-action-linux@main
with:
path: .
- uses: actions/upload-artifact@v2
with:
name: disco_hue-linux
path: dist/linux
- 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 }}
body: |
Changes in this Release
- First Change
- Second Change
draft: false
prerelease: false
- name: Upload Release Asset
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/linux/disco_hue
asset_name: disco_hue-linux
asset_content_type: application/octet-stream
- name: Start SSH via Ngrok
if: ${{ failure() }}
run: curl -sL https://gist.githubusercontent.com/retyui/7115bb6acf151351a143ec8f96a7c561/raw/7099b9db76729dc5761da72aa8525f632d8875c9/debug-github-actions.sh | bash
env:
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
USER_PASS: ${{ secrets.NGROK_PASSWORD }}
- name: Don't kill instance
if: ${{ failure() }}
run: sleep 1h # Prevent to killing instance after failure