chore(release): 6.0.1 #128
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 minimal PyInstaller setup launcher for Windows + macOS; attach only three assets to the tag release: | |
| # ChronoArchiver-Setup-<ver>-win64.exe | |
| # ChronoArchiver-Setup-<ver>-mac64.zip | |
| # ChronoArchiver-<ver>-src.zip (src + chronoarchiver.pyw + requirements.txt [+ CHANGELOG]) | |
| # Do not upload unrelated files. Re-run overwrites same-named assets (overwrite_files). | |
| name: Release Installers | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Semver without v — must match an existing release tag (e.g. 6.0.1)' | |
| required: true | |
| default: '6.0.1' | |
| type: string | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Resolve version (tag push or manual) | |
| id: ver | |
| shell: bash | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "VERSION=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "VERSION=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Build minimal setup launcher | |
| env: | |
| CHRONOARCHIVER_VERSION: ${{ steps.ver.outputs.VERSION }} | |
| run: | | |
| pip install pyinstaller | |
| pyinstaller --noconfirm tools/chronoarchiver_setup.spec | |
| ls -la dist/ | |
| shell: bash | |
| - name: Upload Windows artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ChronoArchiver-win64 | |
| path: dist/ChronoArchiver-Setup.exe | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Resolve version (tag push or manual) | |
| id: ver | |
| shell: bash | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "VERSION=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "VERSION=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Generate icon.icns for macOS bundle | |
| run: | | |
| ICONSET="src/ui/assets/icon.iconset" | |
| mkdir -p "$ICONSET" | |
| for sz in 16 32 64 128 256 512; do | |
| sips -z $sz $sz src/ui/assets/icon.png --out "$ICONSET/icon_${sz}x${sz}.png" | |
| sips -z $((sz*2)) $((sz*2)) src/ui/assets/icon.png --out "$ICONSET/icon_${sz}x${sz}@2x.png" | |
| done | |
| iconutil -c icns "$ICONSET" -o src/ui/assets/icon.icns | |
| rm -rf "$ICONSET" | |
| - name: Build minimal setup launcher and zip | |
| env: | |
| CHRONOARCHIVER_VERSION: ${{ steps.ver.outputs.VERSION }} | |
| run: | | |
| pip install pyinstaller | |
| pyinstaller --noconfirm tools/chronoarchiver_setup.spec | |
| ls -la dist/ | |
| cd dist && zip -r "ChronoArchiver-Setup-${{ steps.ver.outputs.VERSION }}-mac64.zip" ChronoArchiver-Setup.app && cd .. | |
| - name: Upload macOS artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ChronoArchiver-mac64 | |
| path: dist/ChronoArchiver-Setup-${{ steps.ver.outputs.VERSION }}-mac64.zip | |
| release: | |
| needs: [build-windows, build-macos] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Resolve version (tag push or manual) | |
| id: ver | |
| shell: bash | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "VERSION=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "VERSION=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Create source zip (runtime files only) | |
| run: | | |
| mkdir -p release | |
| mkdir -p staging/ChronoArchiver | |
| cp -r src chronoarchiver.pyw requirements.txt staging/ChronoArchiver/ | |
| [ -f CHANGELOG.md ] && cp CHANGELOG.md staging/ChronoArchiver/ | |
| cd staging && zip -r "../release/ChronoArchiver-${{ steps.ver.outputs.VERSION }}-src.zip" ChronoArchiver \ | |
| -x "*.pyc" -x "*__pycache__*" -x "*.git*" -x "ChronoArchiver/src/core/models/*" -x "*.onnx" | |
| cd .. | |
| rm -rf staging | |
| - name: Flatten and rename artifacts | |
| run: | | |
| cp artifacts/ChronoArchiver-win64/ChronoArchiver-Setup.exe "release/ChronoArchiver-Setup-${{ steps.ver.outputs.VERSION }}-win64.exe" | |
| cp artifacts/ChronoArchiver-mac64/*.zip release/ | |
| ls -la release/ | |
| echo "Only these files upload to the release:" | |
| ls -1 release/ | |
| - name: Create or update release (three assets only) | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', github.event.inputs.version) || github.ref_name }} | |
| name: ChronoArchiver ${{ steps.ver.outputs.VERSION }} | |
| draft: false | |
| prerelease: false | |
| fail_on_unmatched_files: true | |
| overwrite_files: true | |
| files: | | |
| release/ChronoArchiver-Setup-${{ steps.ver.outputs.VERSION }}-win64.exe | |
| release/ChronoArchiver-Setup-${{ steps.ver.outputs.VERSION }}-mac64.zip | |
| release/ChronoArchiver-${{ steps.ver.outputs.VERSION }}-src.zip | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |