-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,51 @@ | ||
name: Build Executable | ||
name: Build and Upload Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- 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:." main.py | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: executable | ||
path: dist/main # Adjust the path to match your generated executable file | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Python version | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' # Update this if your project uses a different version | ||
|
||
- name: Install dependencies | ||
run: python -m pip install pyinstaller | ||
|
||
- name: Build the executable | ||
run: pyinstaller --onefile --add-data="protontricks/:protontricks/" --add-data="Injector.exe:." main.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: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download release artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: release | ||
|
||
- name: Create GitHub Release | ||
uses: ncipollo/release-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Replace with your access token | ||
with: | ||
tag_name: ${{ github.sha }} # You can customize the tag name here | ||
file_glob: release/*.exe | ||
draft: false # Set to true to create a draft release | ||
prerelease: false # Set to true for pre-releases |