Merge pull request #125 from Jerit3787/master #1
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: Nightly Build | |
on: | |
push: | |
branches: master | |
workflow_dispatch: | |
jobs: | |
release_desktop: | |
strategy: | |
matrix: | |
platform: [ windows-latest, ubuntu-latest, macos-latest, macos-13] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Node.js setup | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
shell: bash | |
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | |
- name: Initialize cache | |
uses: actions/cache@v4 | |
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install app dependencies | |
run: npm install | |
- name: Build app (MacOS - arm64) | |
if: matrix.platform == 'macos-latest' | |
run: npm run build-mac | |
- name: Upload build (MacOS - arm64) | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'macos-latest' | |
with: | |
name: animetv-mac-arm64.dmg | |
path: ./electron/builds/animetv-darwin-arm64/*.dmg | |
- name: Build app (MacOS - x64) | |
if: matrix.platform == 'macos-13' | |
run: npm run build-mac-x64 | |
- name: Upload build (MacOS - x64) | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'macos-13' | |
with: | |
name: animetv-mac-x64.dmg | |
path: ./electron/builds/animetv-darwin-x64/*.dmg | |
- name: Build app (Windows - x64) | |
if: matrix.platform == 'windows-latest' | |
run: npm run build-win | |
- name: Upload build (Windows - x64) | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'windows-latest' | |
with: | |
name: animetv-win32-x64.exe | |
path: ./electron/builds/*.exe | |
- name: Build app (Linux - x64 & arm64) | |
if: matrix.platform == 'ubuntu-latest' | |
run: npm run build-linux && npm run build-linux-arm64 | |
- name: Upload build deb (Linux - x64) | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'ubuntu-latest' | |
with: | |
name: animetv-linux-x64.deb | |
path: ./electron/builds/*_amd64.deb | |
- name: Upload build rpm (Linux - x64) | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'ubuntu-latest' | |
with: | |
name: animetv-linux-x64.rpm | |
path: ./electron/builds/*.x86_64.rpm | |
- name: Upload build deb (Linux - arm64) | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'ubuntu-latest' | |
with: | |
name: animetv-linux-arm64.deb | |
path: ./electron/builds/*_aarch64.deb | |
- name: Upload build rpm (Linux - arm64) | |
uses: actions/upload-artifact@v4 | |
if: matrix.platform == 'ubuntu-latest' | |
with: | |
name: animetv-linux-arm64.rpm | |
path: ./electron/builds/*.aarch64.rpm |