Daily Build #25
This file contains 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: Daily Build | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Cache Node.js modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm install | |
- name: Build Electron app | |
run: npm run package-linux | |
- name: Upload DEB and RPM packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts | |
path: | | |
dist/*.deb | |
dist/*.rpm | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Cache Node.js modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm install | |
- name: Build Electron app for Windows | |
run: npm run package-win | |
- name: Upload EXE package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts-windows | |
path: dist/*.exe | |
publish: | |
needs: [build-linux, build-windows] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-artifacts | |
path: ./dist/linux | |
- name: Download Windows build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-artifacts-windows | |
path: ./dist/windows | |
- name: Create GitHub Release | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
TAG_NAME="daily-build-$(date +'%Y-%m-%d')-${{ github.run_number }}" | |
gh release create $TAG_NAME ./dist/linux/*.deb ./dist/linux/*.rpm ./dist/windows/*.exe --title "Daily Build #${{ github.run_number }}" --notes "Automated build" --prerelease |