removed renaming sections #68
Workflow file for this run
This file contains hidden or 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
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| name: Release Multi Platform | |
| permissions: | |
| contents: write | |
| jobs: | |
| create-release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| outputs: | |
| app_name: ${{ steps.app_info.outputs.app_name }} | |
| version: ${{ steps.app_info.outputs.version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install jq | |
| run: sudo apt-get update && sudo apt-get install -y jq | |
| - name: Extract App Info from base.json | |
| id: app_info | |
| run: | | |
| APP_NAME=$(jq -r '.app_name' src/build/settings/base.json) | |
| VERSION=$(jq -r '.version' src/build/settings/base.json) | |
| echo "app_name=$APP_NAME" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Determine if Pre-release | |
| id: release_type | |
| run: | | |
| TAG="${GITHUB_REF##*/}" | |
| if [[ "$TAG" == *alpha* || "$TAG" == *Alpha* || "$TAG" == *ALPHA* || | |
| "$TAG" == *beta* || "$TAG" == *Beta* || "$TAG" == *BETA* || | |
| "$TAG" == *rc* || "$TAG" == *RC* ]]; then | |
| echo "prerelease=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "prerelease=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ github.ref }} | |
| name: Release ${{ github.ref_name }} | |
| bodyFile: release_text.md | |
| draft: false | |
| prerelease: ${{ steps.release_type.outputs.prerelease == 'true' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| build-linux: | |
| name: Build Ubuntu | |
| needs: create-release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements/base.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ruby ruby-dev rubygems build-essential | |
| sudo gem install --no-document --minimal-deps fpm | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Python dependencies | |
| run: pip install -r requirements/base.txt | |
| - name: Run ppg | |
| run: | | |
| ppg freeze | |
| ppg installer | |
| - name: Debug - List target contents | |
| run: ls -la target/ | |
| - name: Upload to Release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: target/${{ needs.create-release.outputs.app_name }}*.deb | |
| asset_name: ${{ needs.create-release.outputs.app_name }}-${{ needs.create-release.outputs.version }}.deb | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| file_glob: true | |
| build-macos: | |
| name: Build macOS | |
| needs: create-release | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements/base.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Python dependencies | |
| run: pip install -r requirements/base.txt | |
| - name: Run ppg | |
| run: | | |
| ppg freeze | |
| ppg installer | |
| - name: Debug - List target contents | |
| run: ls -la target/ | |
| - name: Upload to Release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: target/${{ needs.create-release.outputs.app_name }}*.dmg | |
| asset_name: ${{ needs.create-release.outputs.app_name }}-${{ needs.create-release.outputs.version }}.dmg | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| file_glob: true | |
| build-windows: | |
| name: Build Windows | |
| needs: create-release | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~\AppData\Local\pip\Cache | |
| key: ${{ runner.os }}-pip-${{ hashFiles('requirements/base.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Visual C++ 2010 Redistributable | |
| run: choco install vcredist2010 --yes | |
| - name: Install NSIS | |
| run: choco install nsis --yes | |
| - name: Add NSIS to PATH | |
| run: echo "C:\Program Files (x86)\NSIS" >> $env:GITHUB_PATH | |
| - name: Verify makensis | |
| run: makensis /VERSION | |
| - name: Install Python dependencies | |
| run: pip install -r requirements/base.txt | |
| - name: Run ppg | |
| run: | | |
| ppg freeze | |
| ppg installer | |
| - name: Debug - List target contents | |
| shell: powershell | |
| run: Get-ChildItem -Path target -Recurse -Force | |
| continue-on-error: true | |
| - name: Upload to Release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: target/*${{ needs.create-release.outputs.app_name }}*Setup.exe | |
| asset_name: ${{ needs.create-release.outputs.app_name }}-${{ needs.create-release.outputs.version }}.exe | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| file_glob: true | |