DeGourou/.github/workflows/main.yml

100 lines
2.6 KiB
YAML
Raw Normal View History

2023-02-23 08:50:09 +00:00
name: Executable Build and Release
2023-02-23 07:41:48 +00:00
on:
workflow_dispatch:
jobs:
build:
2023-02-23 08:50:09 +00:00
name: Build
2023-02-23 07:41:48 +00:00
strategy:
matrix:
2023-06-18 16:55:39 +00:00
os: [macos-latest, ubuntu-16.04, windows-latest]
2023-02-23 07:41:48 +00: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 07:55:17 +00:00
uses: Nuitka/Nuitka-Action@main
2023-02-23 07:41:48 +00:00
with:
script-name: DeGourou.py
onefile: true
2023-06-18 16:55:39 +00:00
standalone: true
2023-02-23 07:41:48 +00:00
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }} Build
path: |
build/*.exe
build/*.bin
2023-02-23 08:50:09 +00:00
build/*.app/**/*
2023-02-23 09:08:16 +00:00
2023-02-23 08:50:09 +00:00
release:
2023-02-23 09:08:16 +00:00
needs: build
2023-02-23 08:50:09 +00: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 11:55:28 +00:00
tag_name: LatestRelease
2023-02-23 08:50:09 +00:00
env:
GITHUB_TOKEN: ${{ github.token }}
2023-02-24 10:46:01 +00: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 08:50:09 +00: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 10:04:06 +00:00
asset_path: ./Linux Build/DeGourou.bin
2023-02-23 10:23:29 +00:00
asset_name: DeGourou-linux
2023-02-23 08:50:09 +00:00
asset_content_type: application/gzip
2023-02-23 10:23:29 +00: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