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
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
- 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:46:00 +01:00
asset_path: ./Linux Build/*.bin
2023-02-23 09:50:09 +01:00
asset_name: DeGourou
asset_content_type: application/gzip
# - 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: ./bin/azblogfilter.darwin-amd64.tar.gz
# asset_name: azblogfilter.darwin-amd64.tar.gz
# asset_content_type: application/gzip
- name: upload windows 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:46:00 +01:00
asset_path: ./Windows Build/*.exe
2023-02-23 09:50:09 +01:00
asset_name: DeGourou.exe
asset_content_type: application/zip