-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add auto compile thingy (hopefully this works???)
- Loading branch information
1 parent
9dfab43
commit 43876b1
Showing
1 changed file
with
53 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Build Release | ||
|
||
env: | ||
APP_NAME: main.pyw | ||
PKG_NAME: Swarm | ||
|
||
|
||
# Controls when the workflow will run | ||
on: release | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
include: | ||
- os: macos-latest | ||
name: macOS | ||
extension: intel | ||
|
||
- os: ubuntu-latest | ||
name: linux-amd64 | ||
extension: bin | ||
|
||
- os: windows-latest | ||
name: windows | ||
extension: exe | ||
|
||
steps: | ||
# Runs a set of commands using the runners shell | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Build with pyInstaller | ||
run: | | ||
echo "Building ${{ env.PKG_NAME }}-${{ github.ref_name }}-${{ matrix.name }}.${{ matrix.extension }}" | ||
pip install -r requirements.txt | ||
pip install pyinstaller | ||
pyinstaller --onefile --console --name ${{ env.PKG_NAME }}-${{ github.ref_name }}-${{ matrix.name }}.${{ matrix.extension }} ${{ env.APP_NAME }} | ||
- name: Push Release | ||
uses: softprops/[email protected] | ||
with: | ||
files: dist/${{ env.PKG_NAME }}-${{ github.ref_name }}-${{ matrix.name }}.${{ matrix.extension }} |