Bump version to 1.0.1 #18
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 Electron App | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| cd client && npm ci | |
| - name: Create .env file with secrets for testing | |
| shell: bash | |
| run: | | |
| cat > .env << EOF | |
| PORT=3001 | |
| NODE_ENV=production | |
| TRAKT_CLIENT_ID=${{ secrets.TRAKT_CLIENT_ID }} | |
| TRAKT_CLIENT_SECRET=${{ secrets.TRAKT_CLIENT_SECRET }} | |
| EOF | |
| - name: Install system dependencies (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libasound2-dev libgtk-3-dev libgbm-dev libnss3-dev libxss1 libxrandr2 libpangocairo-1.0-0 libatk1.0-0 libcairo-gobject2 libgdk-pixbuf2.0-0 | |
| - name: Build client | |
| run: | | |
| npm run client:build | |
| - name: Build Electron app | |
| run: | | |
| if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then | |
| npm run electron:build:linux | |
| elif [ "${{ matrix.os }}" = "windows-latest" ]; then | |
| npm run electron:build:win | |
| elif [ "${{ matrix.os }}" = "macos-latest" ]; then | |
| npm run electron:build:mac | |
| fi | |
| shell: bash | |
| - name: Upload artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: electron-app-${{ matrix.os }} | |
| path: | | |
| dist/ | |
| retention-days: 30 | |
| release: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') && needs.build.result != 'cancelled' && needs.build.result != 'skipped' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| cd client && npm ci | |
| - name: Create .env file with secrets | |
| shell: bash | |
| run: | | |
| cat > .env << EOF | |
| PORT=3001 | |
| NODE_ENV=production | |
| TRAKT_CLIENT_ID=${{ secrets.TRAKT_CLIENT_ID }} | |
| TRAKT_CLIENT_SECRET=${{ secrets.TRAKT_CLIENT_SECRET }} | |
| EOF | |
| # Build step removed - we'll use artifacts from matrix builds | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: release-artifacts | |
| - name: Prepare release assets | |
| run: | | |
| mkdir -p release | |
| find release-artifacts -name "*.AppImage" -type f -exec cp {} release/ \; | |
| find release-artifacts -name "*.dmg" -type f -exec cp {} release/ \; | |
| find release-artifacts -name "*.exe" -type f -exec cp {} release/ \; | |
| ls -la release/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| release/* | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| token: ${{ secrets.GITHUB_TOKEN }} |