Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shishkabob27 committed Jul 10, 2024
1 parent 8fa08a2 commit 2dcc2d2
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,37 @@
name: Build Release
name: Build and Upload Artifact

on:
release:
release:
types:
- created

jobs:
pyinstaller-build:
build:
runs-on: ubuntu-latest
steps:
- name: Create Executable
uses: sayyid5416/[email protected]
with:
python_ver: '3.9'
spec: 'flowcase_upload_server.py'
requirements: 'requirements.txt'
options: --onefile
- name: Checkout repository
uses: actions/checkout@v4

- name: Create Static Executable
run: |
pip install staticx
staticx dist/flowcase_upload_server flowcase_upload_server_static
working-directory: ${{ github.workspace }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: flowcase_upload_server_static
path: flowcase_upload_server_static
- name: Build executable
run: |
pyinstaller --onefile flowcase_upload_server.py
- name: Use staticx
run: |
staticx dist/flowcase_upload_server flowcase_upload_server_staticx
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: flowcase_upload_server_staticx
path: flowcase_upload_server_staticx

0 comments on commit 2dcc2d2

Please sign in to comment.