Skip to content

Commit

Permalink
fix(CI/CD workflow): WIP 2 #95 incorrect arch selected for the runner
Browse files Browse the repository at this point in the history
  • Loading branch information
MRColorR committed Oct 10, 2024
1 parent 6265f27 commit 65998d6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,26 @@ jobs:
echo "Python detected arch: $(python3 -m platform)"
echo "Expected runner architecture: ${{ matrix.architecture }}"
# Setup QEMU and Docker Buildx only for Ubuntu runners targeting arm/arm64 architectures
- name: Set up QEMU for cross-compilation
if: matrix.os == 'ubuntu-latest' && (matrix.architecture == 'arm64' || matrix.architecture == 'armv7')
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Set up Docker Buildx
if: matrix.os == 'ubuntu-latest' && (matrix.architecture == 'arm64' || matrix.architecture == 'armv7')
uses: docker/setup-buildx-action@v3

# Step: Install dependencies
- name: Install dependencies
shell: bash # Use bash shell for consistency
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller # Install PyInstaller
# Step: Build with PyInstaller
- name: Build with PyInstaller
shell: bash
run: |
Expand All @@ -70,18 +83,21 @@ jobs:
--contents-directory "." \
-y
# Archive build artifacts for Windows
- name: Archive build artifacts for release (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Compress-Archive -Path "dist\Money4Band\*" -DestinationPath "Money4Band-${{ matrix.os }}-${{ matrix.architecture }}-${{ github.ref_name }}.zip"
# Archive build artifacts for Unix (Linux/macOS)
- name: Archive build artifacts for release (Unix)
if: runner.os != 'Windows'
shell: bash
run: |
tar -czvf "Money4Band-${{ matrix.os }}-${{ matrix.architecture }}-${{ github.ref_name }}.tar.gz" dist/Money4Band
# Upload build artifacts
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 65998d6

Please sign in to comment.