DeGourou/.github/workflows/main.yml

100 lines
2.6 KiB
YAML
Raw Permalink Normal View History

2023-02-23 19:50:09 +11:00
name: Executable Build and Release
2023-02-23 18:41:48 +11:00
on:
workflow_dispatch:
jobs:
build:
2023-02-23 19:50:09 +11:00
name: Build
2023-02-23 18:41:48 +11:00
strategy:
matrix:
2023-06-19 03:30:18 +10:00
os: [macos-latest, ubuntu-20.04, windows-latest]
2023-02-23 18:41:48 +11:00
runs-on: ${{ matrix.os }}
steps:
- name: Check-out repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9.13'
architecture: 'x64'
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Install Dependencies
run: |
pip install -r requirements.txt
- name: Build Executable
2023-02-23 18:55:17 +11:00
uses: Nuitka/Nuitka-Action@main
2023-02-23 18:41:48 +11:00
with:
script-name: DeGourou.py
onefile: true
2023-06-19 02:55:39 +10:00
standalone: true
2023-02-23 18:41:48 +11:00
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }} Build
path: |
build/*.exe
build/*.bin
2023-02-23 19:50:09 +11:00
build/*.app/**/*
2023-02-23 20:08:16 +11:00
2023-02-23 19:50:09 +11:00
release:
2023-02-23 20:08:16 +11:00
needs: build
2023-02-23 19:50:09 +11:00
permissions: write-all
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: Latest Release
2023-02-23 22:55:28 +11:00
tag_name: LatestRelease
2023-02-23 19:50:09 +11:00
env:
GITHUB_TOKEN: ${{ github.token }}
2023-02-24 21:46:01 +11:00
- name: upload windows artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Windows Build/DeGourou.exe
asset_name: DeGourou-windows.exe
asset_content_type: application/zip
2023-02-23 19:50:09 +11:00
- name: upload linux artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
2023-02-23 21:04:06 +11:00
asset_path: ./Linux Build/DeGourou.bin
2023-02-23 21:23:29 +11:00
asset_name: DeGourou-linux
2023-02-23 19:50:09 +11:00
asset_content_type: application/gzip
2023-02-23 21:23:29 +11:00
- name: upload darwin artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./macOS Build/DeGourou.bin
asset_name: DeGourou-macOS.bin
asset_content_type: application/gzip