chore: create new release v0.3.75 #180
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 Release Binaries | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| macos: | |
| name: macOS Builds | |
| runs-on: macos-14 # macOS Sonoma (stable) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install Dependencies | |
| run: | | |
| npm ci | |
| cd client && npm ci | |
| working-directory: app | |
| - name: Build Client | |
| run: npm run build:client | |
| working-directory: app | |
| - name: Build Electron (x64 + arm64) | |
| run: | | |
| rm -rf dist-electron | |
| npm run dist -- --mac --x64 --arm64 --publish never | |
| working-directory: app | |
| - name: Upload macOS Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-artifacts | |
| path: app/dist-electron/** | |
| linux: | |
| name: Linux Builds | |
| runs-on: ubuntu-22.04 # Ubuntu 22.04 LTS (stable) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [x64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install Dependencies | |
| run: | | |
| npm ci | |
| cd client && npm ci | |
| working-directory: app | |
| - name: Build Client | |
| run: npm run build:client | |
| working-directory: app | |
| - name: Build Electron (${{ matrix.arch }}) | |
| run: | | |
| rm -rf dist-electron | |
| npm run dist -- --linux --${{ matrix.arch }} --publish never | |
| working-directory: app | |
| - name: Upload Linux Artifact (${{ matrix.arch }}) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-${{ matrix.arch }}-artifacts | |
| path: app/dist-electron/** | |
| windows: | |
| name: Windows Builds | |
| runs-on: windows-2022 # Windows Server 2022 (stable) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [x64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install Dependencies | |
| run: | | |
| npm ci | |
| cd client && npm ci | |
| working-directory: app | |
| - name: Build Client | |
| run: npm run build:client | |
| working-directory: app | |
| - name: Build Electron (${{ matrix.arch }}) | |
| shell: pwsh | |
| run: | | |
| if (Test-Path dist-electron) { Remove-Item dist-electron -Recurse -Force } | |
| npm run dist -- --win --${{ matrix.arch }} --publish never | |
| working-directory: app | |
| - name: Upload Windows Artifact (${{ matrix.arch }}) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-${{ matrix.arch }}-artifacts | |
| path: app/dist-electron/** | |
| linux-arm64: | |
| name: Linux ARM64 Build | |
| runs-on: ubuntu-22.04 # Ubuntu 22.04 LTS (stable) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| libfuse2 \ | |
| rpm \ | |
| fakeroot \ | |
| ruby \ | |
| ruby-dev \ | |
| rubygems \ | |
| build-essential | |
| sudo gem install --no-document fpm | |
| - name: Install Dependencies | |
| run: | | |
| npm ci | |
| cd client && npm ci | |
| working-directory: app | |
| - name: Build Client | |
| run: npm run build:client | |
| working-directory: app | |
| - name: Build Electron (Linux ARM64) | |
| run: | | |
| rm -rf dist-electron | |
| npm run dist -- --linux --arm64 --publish never | |
| working-directory: app | |
| env: | |
| USE_SYSTEM_FPM: "true" | |
| - name: List built artifacts | |
| run: | | |
| echo "Built Linux ARM64 artifacts:" | |
| ls -lh app/dist-electron/ | |
| - name: Upload Linux ARM64 Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-arm64-artifacts | |
| path: app/dist-electron/** | |
| release: | |
| name: Create Release | |
| needs: [macos, linux, windows, linux-arm64] | |
| runs-on: ubuntu-22.04 # Ubuntu 22.04 LTS (stable) | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout (for tag annotation) | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare release assets (preserve electron-builder filenames) | |
| run: | | |
| mkdir -p release-assets | |
| TAG="${{ github.ref_name }}" | |
| echo "Downloaded artifacts structure:" | |
| find artifacts -type f | |
| copy_matching_files() { | |
| local source_dir="$1" | |
| shift | |
| if [ ! -d "$source_dir" ]; then | |
| return | |
| fi | |
| for pattern in "$@"; do | |
| find "$source_dir" -maxdepth 1 -type f -name "$pattern" -print -exec cp {} release-assets/ \; | |
| done | |
| } | |
| # macOS assets (only DMG files, skip ZIP due to signing issues) | |
| if [ -d "artifacts/macos-artifacts" ]; then | |
| for file in artifacts/macos-artifacts/*arm64*.dmg; do | |
| if [ -f "$file" ]; then | |
| cp "$file" "release-assets/ncSender_${TAG}_macos_arm64.dmg" | |
| fi | |
| done | |
| for file in artifacts/macos-artifacts/*.dmg; do | |
| if [ -f "$file" ] && [[ "$file" != *arm64* ]]; then | |
| cp "$file" "release-assets/ncSender_${TAG}_macos_x64.dmg" | |
| fi | |
| done | |
| for file in artifacts/macos-artifacts/latest-mac.yml; do | |
| if [ -f "$file" ]; then | |
| cp "$file" "release-assets/latest-mac.yml" | |
| fi | |
| done | |
| fi | |
| # Windows assets | |
| if [ -d "artifacts/windows-x64-artifacts" ]; then | |
| for file in artifacts/windows-x64-artifacts/*.exe; do | |
| if [ -f "$file" ]; then | |
| cp "$file" "release-assets/ncSender_${TAG}_windows_x64.exe" | |
| fi | |
| done | |
| for file in artifacts/windows-x64-artifacts/*.msi; do | |
| if [ -f "$file" ]; then | |
| cp "$file" "release-assets/ncSender_${TAG}_windows_x64.msi" | |
| fi | |
| done | |
| for file in artifacts/windows-x64-artifacts/*.zip; do | |
| if [ -f "$file" ]; then | |
| cp "$file" "release-assets/ncSender_${TAG}_windows_x64.zip" | |
| fi | |
| done | |
| for file in artifacts/windows-x64-artifacts/latest.yml; do | |
| if [ -f "$file" ]; then | |
| cp "$file" "release-assets/latest.yml" | |
| fi | |
| done | |
| fi | |
| VERSION="${TAG#v}" | |
| # Linux x64 assets (.AppImage + .deb) | |
| if [ -d "artifacts/linux-x64-artifacts" ]; then | |
| for file in artifacts/linux-x64-artifacts/*.AppImage; do | |
| if [ -f "$file" ]; then | |
| cp "$file" "release-assets/ncSender_${TAG}_linux_x64.AppImage" | |
| fi | |
| done | |
| for file in artifacts/linux-x64-artifacts/*.deb; do | |
| if [ -f "$file" ]; then | |
| cp "$file" "release-assets/ncSender_${TAG}_linux_x64.deb" | |
| fi | |
| done | |
| fi | |
| # Linux ARM64 assets (.AppImage + .deb) | |
| if [ -d "artifacts/linux-arm64-artifacts" ]; then | |
| for file in artifacts/linux-arm64-artifacts/*.AppImage; do | |
| if [ -f "$file" ]; then | |
| cp "$file" "release-assets/ncSender_${TAG}_linux_arm64.AppImage" | |
| fi | |
| done | |
| for file in artifacts/linux-arm64-artifacts/*.deb; do | |
| if [ -f "$file" ]; then | |
| cp "$file" "release-assets/ncSender_${TAG}_linux_arm64.deb" | |
| fi | |
| done | |
| fi | |
| # Copy architecture-specific YAML files | |
| if [ -f "artifacts/linux-x64-artifacts/latest-linux.yml" ]; then | |
| cp "artifacts/linux-x64-artifacts/latest-linux.yml" "release-assets/latest-linux.yml" | |
| elif [ -f "artifacts/linux-x64-artifacts/latest-linux-x64.yml" ]; then | |
| cp "artifacts/linux-x64-artifacts/latest-linux-x64.yml" "release-assets/latest-linux.yml" | |
| fi | |
| if [ -f "artifacts/linux-arm64-artifacts/latest-linux-arm64.yml" ]; then | |
| cp "artifacts/linux-arm64-artifacts/latest-linux-arm64.yml" "release-assets/latest-linux-arm64.yml" | |
| elif [ -f "artifacts/linux-arm64-artifacts/latest-linux.yml" ]; then | |
| cp "artifacts/linux-arm64-artifacts/latest-linux.yml" "release-assets/latest-linux-arm64.yml" | |
| fi | |
| # Rewrite Linux updater manifests to match renamed asset filenames | |
| if [ -f "release-assets/latest-linux.yml" ]; then | |
| VERSION="${VERSION}" TAG="${TAG}" python3 -c "from pathlib import Path; import os; path = Path('release-assets/latest-linux.yml'); text = path.read_text(); version = os.environ['VERSION']; tag = os.environ['TAG']; text = text.replace(f'ncSender-{version}.AppImage', f'ncSender_{tag}_linux_x64.AppImage'); text = text.replace(f'ncsender_{version}_amd64.deb', f'ncSender_{tag}_linux_x64.deb'); path.write_text(text)" | |
| fi | |
| if [ -f "release-assets/latest-linux-arm64.yml" ]; then | |
| VERSION="${VERSION}" TAG="${TAG}" python3 -c "from pathlib import Path; import os; path = Path('release-assets/latest-linux-arm64.yml'); text = path.read_text(); version = os.environ['VERSION']; tag = os.environ['TAG']; text = text.replace(f'ncSender-{version}-arm64.AppImage', f'ncSender_{tag}_linux_arm64.AppImage'); text = text.replace(f'ncsender_{version}_arm64.deb', f'ncSender_{tag}_linux_arm64.deb'); path.write_text(text)" | |
| fi | |
| echo "Release assets to upload:" | |
| ls -lh release-assets/ | |
| - name: Get release notes from latest_release.md | |
| id: release_notes | |
| run: | | |
| if [ -f "latest_release.md" ]; then | |
| cp latest_release.md release-notes.md | |
| echo "Release notes content:" | |
| cat release-notes.md | |
| echo "---END RELEASE NOTES---" | |
| else | |
| echo "⚠️ latest_release.md not found, using default message" | |
| echo "Release ${{ github.ref_name }}" > release-notes.md | |
| fi | |
| - name: Create Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create ${{ github.ref_name }} \ | |
| --repo ${{ github.repository }} \ | |
| --title "Release ${{ github.ref_name }}" \ | |
| --notes-file release-notes.md \ | |
| release-assets/* |