fixed version number from 0.1.3 to 1.3.0 #4
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
| name: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| # --- WINDOWS BUILD --- | |
| build-windows: | |
| runs-on: windows-latest | |
| outputs: | |
| version: ${{ steps.get_version.outputs.VERSION }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Extract Version | |
| id: get_version | |
| shell: pwsh | |
| run: | | |
| $version = (Get-Content pyproject.toml | Select-String '^version\s*=\s*\"(.*)\"').Matches.Groups[1].Value | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| - name: Build with Nuitka | |
| run: uv run python -m nuitka --output-filename=hdr_merge_master.exe hdr_brackets.py | |
| - name: Package Windows Zip | |
| shell: pwsh | |
| run: | | |
| Rename-Item -Path "build/hdr_brackets.dist" -NewName "hdr_merge_master" | |
| Compress-Archive -Path "build/hdr_merge_master/*" -DestinationPath "build/hdr_merge_master_v${{ steps.get_version.outputs.VERSION }}-win.zip" -Force | |
| - name: Upload Windows Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-build | |
| path: build/*.zip | |
| # --- LINUX BUILD --- | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| needs: build-windows | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3-tk patchelf | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Build with Nuitka | |
| run: uv run python -m nuitka --output-filename=hdr_merge_master hdr_brackets.py | |
| - name: Package Linux Tarball | |
| run: | | |
| mv build/hdr_brackets.dist build/hdr_merge_master | |
| tar -czvf build/hdr_merge_master_v${{ needs.build-windows.outputs.version }}-linux.tar.gz -C build/ hdr_merge_master | |
| - name: Upload Linux Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-build | |
| path: build/*.tar.gz | |
| # --- CREATE RELEASE --- | |
| create-release: | |
| runs-on: ubuntu-latest | |
| needs: [build-windows, build-linux] | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| merge-multiple: true | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ./artifacts/* | |
| name: Release v${{ needs.build-windows.outputs.version }} | |
| tag_name: ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |