fix(ci): should upload render assets

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2024-12-12 22:18:02 +08:00
parent 40dc4c6775
commit fb08ee964d
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
2 changed files with 12 additions and 75 deletions

View File

@ -1,75 +0,0 @@
name: Build Electron Render
on:
push:
tags:
- "v*"
env:
VITE_WEB_URL: ${{ vars.VITE_WEB_URL }}
VITE_API_URL: ${{ vars.VITE_API_URL }}
VITE_IMGPROXY_URL: ${{ vars.VITE_IMGPROXY_URL }}
VITE_SENTRY_DSN: ${{ vars.VITE_SENTRY_DSN }}
VITE_OPENPANEL_CLIENT_ID: ${{ vars.VITE_OPENPANEL_CLIENT_ID }}
VITE_OPENPANEL_API_URL: ${{ vars.VITE_OPENPANEL_API_URL }}
VITE_FIREBASE_CONFIG: ${{ vars.VITE_FIREBASE_CONFIG }}
NODE_OPTIONS: --max-old-space-size=8192
jobs:
build-render:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
permissions:
id-token: write
contents: write
attestations: write
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
lfs: true
- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ matrix.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ matrix.os }}-
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
- name: Install dependencies
run: pnpm i
- name: Build
run: pnpm build:render
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Setup Version
id: version
uses: ./.github/actions/setup-version
- name: Create Release Draft
uses: softprops/action-gh-release@v2
with:
name: v${{ steps.version.outputs.APP_VERSION }}
draft: false
prerelease: true
tag_name: v${{ steps.version.outputs.APP_VERSION }}
files: |
dist/manifest.yml
dist/*.tar.gz

View File

@ -120,6 +120,12 @@ jobs:
KEYCHAIN_PATH: ${{ runner.temp }}/app-signing.keychain-db
run: npm exec turbo run //#build:macos
- name: Build Renderer
if: matrix.os == 'ubuntu-latest'
run: pnpm build:render
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Upload file
uses: actions/upload-artifact@v4
env:
@ -133,6 +139,8 @@ jobs:
out/make/**/*.exe
out/make/**/*.AppImage
out/make/**/*.yml
dist/manifest.yml
dist/*.tar.gz
retention-days: 90
- name: Upload file (arm64.dmg)
@ -157,6 +165,8 @@ jobs:
out/make/**/*.exe
out/make/**/*.AppImage
out/make/**/*.yml
dist/manifest.yml
dist/*.tar.gz
- run: npx changelogithub
if: github.ref_type == 'tag' || github.event.inputs.tag_version != ''
@ -182,3 +192,5 @@ jobs:
out/make/**/*.exe
out/make/**/*.AppImage
out/make/**/*.yml
dist/manifest.yml
dist/*.tar.gz