Skip to content

Commit

Permalink
add auto compile thingy (hopefully this works???)
Browse files Browse the repository at this point in the history
  • Loading branch information
audreyreal committed Mar 3, 2023
1 parent 9dfab43 commit 43876b1
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build-release.yml
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 }}

0 comments on commit 43876b1

Please sign in to comment.