Add build action
This commit is contained in:
69
.github/workflows/build.yml
vendored
Normal file
69
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: Build and release new version
|
||||
run-name: Building (${{ github.event_name }} by ${{ github.actor }})
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
Create-Pyinstaller-Build:
|
||||
name: Create build for ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows]
|
||||
|
||||
steps:
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install Poetry
|
||||
run: pip install poetry
|
||||
|
||||
- name: Install dependencies
|
||||
run: poetry install
|
||||
|
||||
- name: Create PyInstaller executable
|
||||
run: poetry run pyinstaller D0CXUN7R4C3.spec
|
||||
|
||||
- name: Upload build to storage
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-build
|
||||
path: dist/*
|
||||
|
||||
Upload-Release:
|
||||
name: Upload release
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- Create-Pyinstaller-Build
|
||||
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download Windows build
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: windows-build
|
||||
path: dist/
|
||||
|
||||
- name: Display all files
|
||||
run: ls -R
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: dist/*
|
||||
fail_on_unmatched_files: true
|
||||
Reference in New Issue
Block a user