v0.0.20 #28
Workflow file for this run
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: Build App for Release | |
on: | |
release: | |
types: [prereleased] | |
permissions: write-all | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "21" | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install frontend dependencies | |
run: npm install --legacy-peer-deps | |
working-directory: ./frontend | |
- name: Install backend dependencies | |
run: npm install | |
working-directory: ./backend | |
- name: Package and Build the Electron app | |
run: | | |
npm run make | |
working-directory: ./backend | |
- name: Archive the build (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
mkdir -p distributables/deb distributables/rpm | |
cp ./backend/out/make/deb/**/*.deb distributables/deb/quick-finder-amd64.deb | |
cp ./backend/out/make/rpm/**/*.rpm distributables/rpm/quick-finder-x86_64.rpm | |
cd distributables | |
zip -r quickfinder-linux.zip * | |
cd .. | |
- name: Collect built distributables (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
mkdir distributables | |
cd ./backend/out/make/squirrel.windows/* | |
cp *.exe ../../../../../distributables/quickfinder-windows-installer.exe | |
cd ../../../../.. | |
- name: Collect built distributables (macOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
mkdir distributables | |
cd ./backend/out/make | |
cp *.dmg ../../../distributables/QuickFinder.dmg | |
cd ../../.. | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Display structure of downloaded files | |
run: ls -R | |
working-directory: ./ | |
- name: Upload Release Asset (Ubuntu - deb) | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: distributables/deb/quick-finder-amd64.deb | |
asset_name: quick-finder-amd64-installer.deb | |
asset_content_type: application/vnd.debian.binary-package | |
- name: Upload Release Asset (Ubuntu - rpm) | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./distributables/rpm/quick-finder-x86_64.rpm | |
asset_name: quick-finder-x86_64-installer.rpm | |
asset_content_type: application/x-rpm | |
- name: Upload Release Asset (Windows - exe) | |
if: matrix.os == 'windows-latest' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./distributables/quickfinder-windows-installer.exe | |
asset_name: quickfinder-windows-installer.exe | |
asset_content_type: application/octet-stream | |
- name: Upload Release Asset (macOS) | |
if: matrix.os == 'macos-latest' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./distributables/QuickFinder.dmg | |
asset_name: quickfinder-macos-installer.dmg | |
asset_content_type: application/octet-stream |