Deploy #8
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: Deploy | |
on: | |
workflow_dispatch: | |
jobs: | |
api: | |
name: Build API | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build | |
run: ./gradlew --no-daemon :api:bootJar | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: api-${{ github.sha }} | |
path: desktop/api.jar | |
retention-days: 1 | |
desktop: | |
needs: api | |
name: Build Desktop App | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: desktop | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Download API | |
uses: actions/download-artifact@v4 | |
with: | |
name: api-${{ github.sha }} | |
path: desktop | |
- name: Install Dependencies | |
run: npm i | |
- name: Install Linux Build Dependencies | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: sudo apt-get install -y rpm | |
- name: Build | |
run: npm run electron:build | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nebulosa-${{ matrix.os }}-${{ github.sha }} | |
path: | | |
desktop/release/nebulosa*.AppImage | |
desktop/release/nebulosa*.deb | |
desktop/release/nebulosa*.rpm | |
desktop/release/nebulosa*.exe | |
desktop/release/nebulosa*.dmg | |
retention-days: 3 |