release: prepare 2.1.0-beta.1 #3
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 NullifyPDF (Beta) | |
| on: | |
| push: | |
| tags: | |
| - 'v*-beta.*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| actions: read | |
| concurrency: | |
| group: beta-release-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build for ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, ubuntu-22.04, macos-latest] | |
| variant: [lite, full] | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: '3.13' | |
| cache: 'pip' | |
| - name: Install System Dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y rpm dpkg binutils libxcb-cursor0 libxkbcommon-x11-0 libegl1 desktop-file-utils | |
| - name: Install Python Dependencies (includes spaCy models) | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run Smoke Tests | |
| run: pytest tests/ -v | |
| - name: Type Check (mypy) | |
| shell: bash | |
| run: mypy NullifyPDF.py --ignore-missing-imports --no-error-summary 2>&1 | head -50 || true | |
| - name: Resolve beta suffix from tag | |
| if: startsWith(github.ref, 'refs/tags/') | |
| shell: bash | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| echo "NULLIFYPDF_BETA_SUFFIX=${TAG#*-}" >> "$GITHUB_ENV" | |
| - name: Build | |
| env: | |
| NULLIFYPDF_BUILD_VARIANT: ${{ matrix.variant }} | |
| run: python build_local.py | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: beta-build-${{ runner.os }}-${{ matrix.variant }} | |
| retention-days: 5 | |
| path: | | |
| dist/NullifyPDF_v*_Windows_*.exe | |
| dist/NullifyPDF_v*_macOS_*.zip | |
| dist/NullifyPDF_v*_Ubuntu_*.deb | |
| dist/NullifyPDF_v*_Fedora_*.rpm | |
| create_beta_release: | |
| name: Create GitHub Beta Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download All Artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: all-builds | |
| pattern: beta-build-* | |
| merge-multiple: true | |
| - name: Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| prerelease: true | |
| files: | | |
| all-builds/NullifyPDF_v*_Windows_*.exe | |
| all-builds/NullifyPDF_v*_macOS_*.zip | |
| all-builds/NullifyPDF_v*_Ubuntu_*.deb | |
| all-builds/NullifyPDF_v*_Fedora_*.rpm | |
| body: "Beta release NullifyPDF (build da develop). Include varianti Lite e Full OCR. Non usare in produzione. Se supera i test, questa build verra' promossa a stable senza ricompilazione." | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |