summaryrefslogtreecommitdiff
path: root/.github/workflows/pyinstaller-release.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/pyinstaller-release.yaml')
-rw-r--r--.github/workflows/pyinstaller-release.yaml49
1 files changed, 37 insertions, 12 deletions
diff --git a/.github/workflows/pyinstaller-release.yaml b/.github/workflows/pyinstaller-release.yaml
index 44e2716..a4255b7 100644
--- a/.github/workflows/pyinstaller-release.yaml
+++ b/.github/workflows/pyinstaller-release.yaml
@@ -5,11 +5,8 @@ on:
types: [created]
jobs:
- build:
+ webpack:
runs-on: ubuntu-latest
- strategy:
- matrix:
- arch: [x64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -27,11 +24,14 @@ jobs:
working-directory: ./static
run: npx webpack
- - name: Set up QEMU for cross-architecture
- if: matrix.arch == 'arm64'
- uses: docker/setup-qemu-action@v3
- with:
- platforms: arm64
+ pyinstaller:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ arch: [x64, arm64]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
# - name: Run pyinstaller
# uses: sayyid5416/pyinstaller@v1
@@ -42,6 +42,12 @@ jobs:
# #upload_exe_with_name: 'pix'
# options: --onefile
+ - name: Set up QEMU for cross-architecture
+ if: matrix.arch == 'arm64'
+ uses: docker/setup-qemu-action@v3
+ with:
+ platforms: arm64
+
- name: Set up Python
uses: actions/setup-python@v5
with:
@@ -64,13 +70,32 @@ jobs:
TARGET_ARCH: ${{ matrix.arch }}
run: |
if [ "${{ matrix.arch }}" = "arm64" ]; then
- pyinstaller --onefile --target-arch aarch64 pix.py
+ pyinstaller --onefile --target-arch aarch64 pix.spec
else
- pyinstaller --onefile pix.py
+ pyinstaller --onefile pix.spec
fi
+ - name: Rename the executable
+ run: |
+ mv ./dist/pix ./dist/pixpy-${{ matrix.arch }}
+
- name: Upload executable
uses: actions/upload-artifact@v4
with:
name: pixpy-${{ matrix.arch }}
- path: dist/pix
+ path: ./dist/pixpy-${{ matrix.arch }}
+
+ release:
+ needs: build
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Create Release and Upload Assets
+ uses: softprops/action-gh-release@v2
+ with:
+ files: |
+ ./dist/pixpy-*
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}