remove duplicated log #13
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
| # Build release artifacts when a version tag is pushed (v*). | |
| # Linux : .deb + tar.gz + AppImage + SHA256SUMS (PySide6, validated). | |
| # Windows: PyInstaller onedir + zip + Inno Setup installer (continue-on-error until CI is stable). | |
| # macOS : PyInstaller .app + zip (continue-on-error, unvalidated without a macOS machine). | |
| # | |
| # workflow_dispatch: manual trigger for CI validation without creating a tag or release. | |
| # Tags with '-' (e.g. v2.0.0-rc1) are published as GitHub pre-releases. | |
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to build (e.g. 2.0.0-rc1)" | |
| required: true | |
| default: "2.0.0-dev" | |
| permissions: | |
| contents: write | |
| jobs: | |
| version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.v.outputs.version }} | |
| steps: | |
| - id: v | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT" | |
| else | |
| ref="${GITHUB_REF_NAME}" | |
| echo "version=${ref#v}" >> "$GITHUB_OUTPUT" | |
| fi | |
| linux: | |
| needs: version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y dpkg-dev gettext | |
| - name: Download appimagetool | |
| run: | | |
| arch="$(uname -m)" | |
| mkdir -p tools | |
| wget -q -O "tools/appimagetool-${arch}.AppImage" \ | |
| "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${arch}.AppImage" | |
| chmod +x "tools/appimagetool-${arch}.AppImage" | |
| - name: Build Linux artifacts | |
| run: | | |
| chmod +x packaging/linux/*.sh | |
| ./packaging/linux/release.sh "${{ needs.version.outputs.version }}" | |
| - name: Upload Linux artifacts | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: linux-${{ needs.version.outputs.version }} | |
| path: | | |
| dist/netneighbor_*.deb | |
| dist/netneighbor-*.tar.gz | |
| dist/NetNeighbor-*.AppImage | |
| dist/SHA256SUMS-*.txt | |
| windows: | |
| needs: version | |
| runs-on: windows-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| - uses: actions/setup-python@v5.6.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Inno Setup | |
| run: choco install innosetup --no-progress -y | |
| - name: Build Windows bundle | |
| run: | | |
| .\packaging\windows\build.ps1 -Version ${{ needs.version.outputs.version }} | |
| - name: Build Windows installer | |
| run: | | |
| .\packaging\windows\build_installer.ps1 -Version ${{ needs.version.outputs.version }} | |
| - name: Upload Windows artifacts | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: windows-${{ needs.version.outputs.version }} | |
| path: dist/NetNeighbor-*-win64-setup.exe | |
| macos-arm64: | |
| needs: version | |
| runs-on: macos-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| - uses: actions/setup-python@v5.6.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Python dependencies | |
| run: python3 -m pip install -r requirements.txt pyinstaller | |
| - name: Install create-dmg | |
| run: brew install create-dmg | |
| - name: Build macOS arm64 app bundle + DMG | |
| run: | | |
| bash packaging/macos/build_app.sh "${{ needs.version.outputs.version }}" arm64 | |
| - name: Smoke test arm64 binary | |
| run: | | |
| APP="dist/NetNeighbor.app/Contents/MacOS/NetNeighbor" | |
| echo "Launching $APP for 5 s..." | |
| "$APP" & | |
| PID=$! | |
| sleep 5 | |
| if kill -0 "$PID" 2>/dev/null; then | |
| kill "$PID" | |
| echo "PASS: process still alive after 5 s" | |
| else | |
| wait "$PID"; CODE=$? | |
| # 0 = clean exit, 124 = killed by timeout — both acceptable | |
| if [ "$CODE" -eq 0 ] || [ "$CODE" -eq 124 ]; then | |
| echo "PASS: process exited cleanly (code $CODE)" | |
| else | |
| echo "FAIL: process crashed (exit code $CODE)" | |
| exit 1 | |
| fi | |
| fi | |
| - name: Cleanup .app bundle (DMG only in release) | |
| run: rm -rf dist/NetNeighbor.app | |
| - name: Upload macOS arm64 artifacts | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: macos-arm64-${{ needs.version.outputs.version }} | |
| path: dist/NetNeighbor-*-macos-arm64.dmg | |
| macos-intel: | |
| needs: version | |
| runs-on: macos-15-intel | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| - uses: actions/setup-python@v5.6.0 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Python dependencies | |
| # PySide6 6.5.x is the last series supporting macOS 11 (Big Sur). | |
| # PySide6 6.6+ raised the minimum to macOS 12. | |
| # PySide6 6.5.x requires Python <3.12, so we use Python 3.11. | |
| run: python3 -m pip install "PySide6>=6.5,<6.6" -r requirements.txt pyinstaller | |
| - name: Install create-dmg | |
| run: brew install create-dmg | |
| - name: Build macOS Intel app bundle + DMG | |
| run: | | |
| bash packaging/macos/build_app.sh "${{ needs.version.outputs.version }}" x86_64 | |
| - name: Smoke test Intel binary | |
| run: | | |
| APP="dist/NetNeighbor.app/Contents/MacOS/NetNeighbor" | |
| echo "Launching $APP for 5 s..." | |
| "$APP" & | |
| PID=$! | |
| sleep 5 | |
| if kill -0 "$PID" 2>/dev/null; then | |
| kill "$PID" | |
| echo "PASS: process still alive after 5 s" | |
| else | |
| wait "$PID"; CODE=$? | |
| if [ "$CODE" -eq 0 ] || [ "$CODE" -eq 124 ]; then | |
| echo "PASS: process exited cleanly (code $CODE)" | |
| else | |
| echo "FAIL: process crashed (exit code $CODE)" | |
| exit 1 | |
| fi | |
| fi | |
| - name: Cleanup .app bundle (DMG only in release) | |
| run: rm -rf dist/NetNeighbor.app | |
| - name: Upload macOS Intel artifacts | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: macos-intel-${{ needs.version.outputs.version }} | |
| path: dist/NetNeighbor-*-macos-intel.dmg | |
| github-release: | |
| needs: [version, linux, windows, macos-arm64, macos-intel] | |
| runs-on: ubuntu-latest | |
| if: always() && needs.linux.result == 'success' && github.event_name == 'push' | |
| steps: | |
| - uses: actions/download-artifact@v4.3.0 | |
| with: | |
| path: release-assets | |
| merge-multiple: true | |
| - name: Flatten release files | |
| run: | | |
| mkdir -p dist-flat | |
| find release-assets -type f \( \ | |
| -name '*.deb' -o -name '*.tar.gz' -o -name '*.AppImage' -o \ | |
| -name '*.zip' -o -name '*.dmg' -o -name '*.exe' -o -name 'SHA256SUMS-*.txt' \ | |
| \) -exec cp {} dist-flat/ \; | |
| - name: Attach to GitHub Release | |
| uses: softprops/action-gh-release@v2.3.2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| files: dist-flat/* | |
| generate_release_notes: true | |
| prerelease: ${{ contains(github.ref_name, '-') }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |