add doc/releases/5.4.2.md #3
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 Windows wx | |
| on: | |
| push: | |
| branches: | |
| - 'build-release' | |
| paths-ignore: | |
| - 'doc/**' | |
| - '*.md' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PYTHONWARNINGS: ignore::EncodingWarning | |
| PYTHONWARNDEFAULTENCODING: 0 | |
| APPNAME: PyGlossaryWx | |
| DIST_DIR: dist.nuitka.wx | |
| DEFAULT_UI: wx | |
| MAIN_SCRIPT: main.py | |
| RESOURCE_DIR: resources | |
| jobs: | |
| build_windows_wx: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Check-out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| architecture: x64 | |
| - name: Set environment variables | |
| shell: bash | |
| run: | | |
| VERSION=$(git describe --abbrev=0 --tags || git describe) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "VERSION_WITH_HASH=$(git describe)" >> $GITHUB_ENV | |
| echo "FILENAME_BASE=${{ env.APPNAME }}-${VERSION}-Windows-${RUNNER_ARCH}" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| shell: bash | |
| run: python3 .github/scripts/win/install-deps.py | |
| - name: Patch sources for nuitka build | |
| shell: bash | |
| run: python3 .github/scripts/win/patch_sources.py | |
| - name: Install nuitka | |
| shell: bash | |
| run: pip install -U nuitka | |
| - name: Nuitka build | |
| env: | |
| PYTHONWARNDEFAULTENCODING: 0 | |
| run: python3 .github/scripts/win/nuitka-build.py | |
| - name: Copy assets | |
| shell: bash | |
| run: python3 .github/scripts/win/copy_assets.py | |
| - name: Pack to zip before uploading | |
| shell: cmd | |
| working-directory: ${{ env.DIST_DIR }}\${{ env.APPNAME }}.dist | |
| run: | | |
| 7z a -tzip ..\..\${{ env.FILENAME_BASE }}-dist.zip . | |
| - name: Upload dist zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.FILENAME_BASE }} | |
| if-no-files-found: error | |
| path: | | |
| ${{ env.FILENAME_BASE }}-dist.zip | |
| - name: Create Inno Installer | |
| shell: cmd | |
| run: >- | |
| iscc .github/scripts/win/inno_setup.iss | |
| /DMyAppVersion="${{ env.VERSION }}" | |
| /DMyAppName="${{ env.APPNAME }}" | |
| /DMyAppExeName="${{ env.APPNAME }}.exe" | |
| /DOutputBaseFilenamePrefix="${{ env.APPNAME }}" | |
| /DSourceFilesGlob="${{ github.workspace }}\${{ env.DIST_DIR }}\${{ env.APPNAME }}.dist\*" | |
| /DLicenseFile="${{ github.workspace }}\LICENSE" | |
| /O${{ github.workspace }}\Output | |
| - name: Upload Inno Installer EXE | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.FILENAME_BASE }}-installer | |
| if-no-files-found: error | |
| path: | | |
| Output\*.exe | |
| release: | |
| if: true | |
| needs: [build_windows_wx] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Set release vars | |
| run: | | |
| echo "VERSION=$(git describe --abbrev=0)" >> $GITHUB_ENV | |
| echo "VERSION_WITH_HASH=$(git describe)" >> $GITHUB_ENV | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| merge-multiple: true | |
| - name: List generated artifacts | |
| run: | | |
| pwd | |
| echo ${{ github.workspace }}/artifacts | |
| find ${{ github.workspace }}/artifacts | |
| - name: make release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| name: ${{ env.VERSION }} | |
| body: | | |
| ### ${{ github.event.repository.name }}-${{ env.VERSION_WITH_HASH }} | |
| ## Windows (wxPython UI) | |
| - Portable zip and installer for Windows x64 (`PyGlossaryWx`) | |
| artifacts: "artifacts/*.zip,artifacts/*.exe" | |
| artifactContentType: application/zip | |
| generateReleaseNotes: true | |
| makeLatest: true | |
| allowUpdates: true | |
| omitBodyDuringUpdate: true | |
| tag: ${{ env.VERSION }} |