Skip to content

Commit

Permalink
New build
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitenite committed Jul 10, 2024
1 parent 80b9a24 commit 846efb5
Showing 1 changed file with 23 additions and 35 deletions.
58 changes: 23 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,38 @@
name: Build
name: Build/release

on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "**.spec.js"
- ".idea"
- ".vscode"
- ".dockerignore"
- "Dockerfile"
- ".gitignore"
- ".github/**"
- "!.github/workflows/build.yml"
on: push

jobs:
build:
release:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Check out Git repository
uses: actions/checkout@v1

- name: Setup Node.js
uses: actions/setup-node@v3
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 18

- name: Navigate to App dir
run: cd app

- name: Install Dependencies
run: npm install

- name: Build Release Files
run: npm run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Artifact
uses: actions/upload-artifact@v3
- name: Set permissions
if: matrix.os == 'ubuntu-latest'
run: |
sudo chown -R $USER:$USER app/release
chmod -R 755 app/release
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
name: release_on_${{ matrix. os }}
path: release/
retention-days: 5
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
package_root: app

0 comments on commit 846efb5

Please sign in to comment.