chore: pack tamagotchi (#20)

* pin electron-builder version to 24.13.3

* change artifactName to product name

* add workflow file

* build dependencies

* fix path

* env cannot cross job

* remove non-exists dependency

* use powershell for windows

* fix string

* fix env

* fix release permission

* fix generate release note

* remove version prefix

---------

Co-authored-by: Neko <neko@ayaka.moe>
This commit is contained in:
LemonNeko
2025-02-10 19:42:33 +08:00
committed by GitHub
co-authored by Neko
parent 1c4be9f6e3
commit 5abede8a29
5 changed files with 147 additions and 671 deletions
+103
View File
@@ -0,0 +1,103 @@
name: Release Tamagotchi
permissions:
contents: write
on:
push:
tags:
- 'v*'
jobs:
build-tamagotchi:
name: Build Tamagotchi
strategy:
matrix:
include:
- os: macos-13
platform: mac
arch: x64
artifact: dmg
- os: macos-latest
platform: mac
arch: arm64
artifact: dmg
- os: ubuntu-latest
platform: linux
arch: x86_64
artifact: AppImage
- os: ubuntu-24.04-arm
platform: linux
arch: arm64
artifact: AppImage
- os: windows-latest
platform: win
arch: x64
artifact: exe
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
# registry-url required. Learn more at
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Dependencies
run: pnpm run build
- name: Build Application
run: pnpm run -F @proj-airi/stage-tamagotchi build:${{ matrix.platform }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: airi-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.ref_name }}
path: packages/stage-tamagotchi/dist/airi-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.ref_name }}.${{ matrix.artifact }}
release-tamagotchi:
name: Release Tamagotchi
runs-on: ubuntu-24.04
needs: build-tamagotchi
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist
- run: ls -la dist
- name: Upload To GitHub Releases
uses: softprops/action-gh-release@v2
with:
files: dist/airi-*
generate_release_notes: true
@@ -14,7 +14,7 @@ asarUnpack:
win:
executableName: tamagotchi
nsis:
artifactName: ${name}-${version}-setup.${ext}
artifactName: ${productName}-${os}-${arch}-v${version}.${ext}
shortcutName: ${productName}
uninstallDisplayName: ${productName}
createDesktopShortcut: always
@@ -27,16 +27,14 @@ mac:
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
dmg:
artifactName: ${name}-${version}.${ext}
artifactName: ${productName}-${os}-${arch}-v${version}.${ext}
linux:
target:
- AppImage
- snap
- deb
maintainer: github.com/moeru-ai Contributors
category: Entertainment
appImage:
artifactName: ${name}-${version}.${ext}
artifactName: ${productName}-${os}-${arch}-v${version}.${ext}
npmRebuild: false
# publish:
# provider: generic
+1 -1
View File
@@ -101,7 +101,7 @@
"@vue-macros/volar": "^0.30.14",
"@vueuse/motion": "^2.2.6",
"electron": "^34.1.1",
"electron-builder": "^25.1.8",
"electron-builder": "24.13.3",
"electron-vite": "^2.3.0",
"markdown-it-link-attributes": "^4.0.1",
"unplugin-auto-import": "^19.0.0",
+40 -665
View File
File diff suppressed because it is too large Load Diff