name: Release on: push: tags: ['v*'] permissions: contents: write jobs: build-linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20 cache: npm - name: Install rpmbuild run: sudo apt-get update && sudo apt-get install -y rpm - name: Install dependencies run: npm ci - name: Run tests run: npm test - name: Build Linux packages run: npm run build:linux - name: Upload Linux artifacts uses: actions/upload-artifact@v4 with: name: linux-artifacts path: | dist/*.deb dist/*.AppImage dist/*.snap dist/*.rpm retention-days: 5 build-windows: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20 cache: npm - name: Install Wine and NSIS run: | sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install -y wine64 wine32 nsis - name: Install dependencies run: npm ci - name: Build Windows packages run: npm run build:win - name: Upload Windows artifacts uses: actions/upload-artifact@v4 with: name: windows-artifacts path: | dist/*.exe dist/*-win.zip retention-days: 5 release: needs: [build-linux, build-windows] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Download Linux artifacts uses: actions/download-artifact@v4 with: name: linux-artifacts path: dist - name: Download Windows artifacts uses: actions/download-artifact@v4 with: name: windows-artifacts path: dist - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: generate_release_notes: true files: dist/*