Bump stefanzweifel/git-auto-commit-action from 4.16.0 to 5.0.0 #42
Workflow file for this run
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
name: Build x64 Binaries | |
on: | |
pull_request: | |
branches: | |
- master | |
- releases/** | |
defaults: | |
run: | |
shell: bash | |
env: | |
project-name: qBitrr | |
jobs: | |
package: | |
if: github.event.pull_request.draft == false | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python: | |
- '3.10' | |
os: | |
- windows-latest | |
- ubuntu-latest | |
arch: | |
- x64 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python}} | |
architecture: ${{ matrix.arch }} | |
- name: Install APT dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsdl2-dev | |
- name: Get git hash | |
run: | | |
echo "Current Hash: $(git rev-parse --short HEAD)" | |
echo "HASH=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
id: git_hash | |
- name: Set archive name | |
run: | | |
ARCHIVE_NAME=${{ env.project-name }}-${{ steps.git_hash.outputs.HASH }}-${{ matrix.os }}-${{ matrix.arch }} | |
echo "Archive name set to: $ARCHIVE_NAME" | |
echo "NAME=$ARCHIVE_NAME" >> $GITHUB_OUTPUT | |
id: archieve | |
- name: Update git hash | |
run: | | |
sed -i -e 's/git_hash = \".*\"/git_hash = \"${{ steps.git_hash.outputs.HASH }}\"/g' ./qBitrr/bundled_data.py | |
- name: Retrieve current version | |
run: | | |
echo "Current version: $(python setup.py --version)" | |
echo "VERSION=$(python setup.py --version)" >> $GITHUB_OUTPUT | |
id: current_version | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -U pip setuptools wheel | |
python -m pip install -r requirements.dev.txt | |
- name: Run PyInstaller | |
env: | |
PYTHONOPTIMIZE: 1 # Enable optimizations as if the -O flag is given. | |
PYTHONHASHSEED: 42 # Try to ensure deterministic results. | |
PYTHONUNBUFFERED: 1 | |
run: | | |
pyinstaller build.spec | |
# This step exists for debugging. Such as checking if data files were included correctly by PyInstaller. | |
- name: List distribution files | |
run: | | |
find dist | |
# Archive the PyInstaller build using the appropriate tool for the platform. | |
- name: Tar files | |
if: runner.os != 'Windows' | |
run: | | |
tar --format=ustar -czvf ${{ steps.archieve.outputs.NAME }}.tar.gz dist/ | |
- name: Archive files | |
if: runner.os == 'Windows' | |
shell: pwsh | |
run: | | |
Compress-Archive dist/* ${{ steps.archieve.outputs.NAME }}.zip | |
# Upload archives as artifacts, these can be downloaded from the GitHub actions page. | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: automated-build-${{ steps.archieve.outputs.NAME }} | |
path: ${{ steps.archieve.outputs.NAME }}.* | |
if-no-files-found: error |