-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
35 deletions.
There are no files selected for viewing
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
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 |