DeGourou/.github/workflows/main.yml

99 lines
2.6 KiB
YAML
Raw Normal View History

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