allow manual triggering of builds
bump action versions add token reference for electron build add release workflow add links for windows replacements add helper for github build workflow align asset names with build artifact names produce zip artifacts from electron build change artifact name to KiriMoto and add array build target add mac app signing add electron app icons add links.csv helper add dryrun cache build and integration into electron app for faster startup allow windows install alt location. suppress gdpr on localhost / built apps
This commit is contained in:
parent
7e8838da1c
commit
b526bec87e
18 changed files with 372 additions and 59 deletions
107
.github/workflows/build.yml
vendored
107
.github/workflows/build.yml
vendored
|
|
@ -1,24 +1,24 @@
|
|||
name: Build Electron App
|
||||
name: Build and Release Electron App
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch: # Allows manual triggering
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
|
|
@ -26,11 +26,98 @@ jobs:
|
|||
run: npm install
|
||||
|
||||
- name: Build Electron app
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
run: npm run build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: kiri-${{ matrix.os }}-${{ github.ref_name }}
|
||||
path: dist/
|
||||
- name: Display Build Artifacts
|
||||
run: ls -l dist
|
||||
|
||||
- name: Upload Linux artifact
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-linux
|
||||
path: dist/*.zip
|
||||
|
||||
- name: Upload Windows artifact
|
||||
if: matrix.os == 'windows-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-win
|
||||
path: dist/*.exe
|
||||
|
||||
- name: Upload Mac artifact
|
||||
if: matrix.os == 'macos-latest'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-mac
|
||||
path: dist/*.dmg
|
||||
|
||||
- name: Sha256 Mac artifact
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: shasum -a 256 dist/*.dmg
|
||||
|
||||
create_release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Create release name
|
||||
run: node bin/github-getver.js "${{ github.event_name }}"
|
||||
|
||||
- name: Create GitHub Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1.1.4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.TAG_NAME }}
|
||||
release_name: Release ${{ env.TAG_NAME }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Download All Release Assets
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
path: artifacts
|
||||
merge-multiple: true
|
||||
|
||||
- name: Display Downloaded Assets
|
||||
run: ls -ltR artifacts
|
||||
|
||||
- name: Zip Windows artifact
|
||||
run: zip -r artifacts/KiriMoto-win-x64.zip artifacts/KiriMoto-win-x64.exe
|
||||
|
||||
- name: Upload Release Asset (Linux)
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/KiriMoto-linux-x64.zip
|
||||
asset_name: KiriMoto-Ubuntu-x64-${{ env.TAG_NAME }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload Release Asset (macOS)
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/KiriMoto-mac-arm64.dmg
|
||||
asset_name: KiriMoto-MacOS-arm-${{ env.TAG_NAME }}.dmg
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload Release Asset (Windows)
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: artifacts/KiriMoto-win-x64.zip
|
||||
asset_name: KiriMoto-Win-x64-${{ env.TAG_NAME }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
|
|
|||
Loading…
Reference in a new issue