Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
BrownNPC authored May 3, 2024
1 parent 5d6310f commit 6193c97
Showing 1 changed file with 24 additions and 35 deletions.
59 changes: 24 additions & 35 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,33 @@
name: Build and Upload Release
name: Build Executable

on:
push:
branches: [ main ]
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Python version
uses: actions/setup-python@v3
with:
python-version: '3.12.2'

- name: Install dependencies
run: python -m pip install pyinstaller

- name: Build the executable
run: pyinstaller --onefile --add-data="protontricks/:protontricks/" --add-data="Injector.exe:." pg3d-injector.py

- name: Upload release artifact
uses: actions/upload-artifact@v3
with:
name: release
path: dist/* # Change the pattern if the output filename is different

publish:
runs-on: ubuntu-latest
needs: build # This job depends on the build job

steps:
- name: Create GitHub Release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Replace with your secret
with:
artifacts: ${{ artifacts.release-artifact }}
tag: ${{ github.ref }} # Use the pushed tag


- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12.2' # Replace 'x' with your desired Python version

- name: Install dependencies
run: |
pip install pyinstaller
- name: Build executable
run: |
pyinstaller --onefile --add-data="protontricks/:protontricks/" --add-data="Injector.exe:." pg3d-injector.py
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: executable
path: dist/main # Adjust the path to match your generated executable file

0 comments on commit 6193c97

Please sign in to comment.