Created ci.yml, added release for windows, mac and linux
This commit is contained in:
1 parent
0eb340e1c2
commit
e241442302
5 files changed
+144
-1
No files matched your search
@@ -0,0 +1,102 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
name: Verify (build + tests)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run tests (if present)
|
||||
run: npm run test --if-present
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
package:
|
||||
name: Package (${{ matrix.name }})
|
||||
needs: verify
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: Windows
|
||||
os: windows-latest
|
||||
platform: win
|
||||
arch: x64
|
||||
artifact_glob: release/*.exe
|
||||
- name: Linux
|
||||
os: ubuntu-latest
|
||||
platform: linux
|
||||
arch: x64
|
||||
artifact_glob: release/*.AppImage
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build app bundles
|
||||
run: npm run build
|
||||
|
||||
- name: Build installers
|
||||
env:
|
||||
CSC_IDENTITY_AUTO_DISCOVERY: "false"
|
||||
run: npx electron-builder --${{ matrix.platform }} --${{ matrix.arch }} --publish never
|
||||
|
||||
- name: Upload installer artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: 5ET-D-${{ matrix.platform }}-${{ github.sha }}
|
||||
path: ${{ matrix.artifact_glob }}
|
||||
if-no-files-found: error
|
||||
|
||||
macos_source:
|
||||
name: Package (macOS arm64 source)
|
||||
needs: verify
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Create source archive for macOS arm64 users
|
||||
run: |
|
||||
mkdir -p release
|
||||
git archive --format=tar.gz --output="release/5ET-D-macos-arm64-source-${GITHUB_SHA::7}.tar.gz" HEAD
|
||||
|
||||
- name: Upload macOS source artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: 5ET-D-macos-arm64-source-${{ github.sha }}
|
||||
path: release/5ET-D-macos-arm64-source-*.tar.gz
|
||||
if-no-files-found: error
|
||||
Reference in new issue
Block a user