mirror of
https://github.com/galacean/engine.git
synced 2026-07-01 16:14:22 +08:00
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: Release Official Kit
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Version to use for editor-preload-official package'
|
|
required: false
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
run_install: true
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '>=22.6.0'
|
|
registry-url: https://registry.npmjs.org/
|
|
cache: pnpm
|
|
|
|
- name: Build Engine
|
|
run: pnpm b:all
|
|
|
|
- name: Make scripts executable
|
|
run: |
|
|
chmod +x ./scripts/build-official-preload.js
|
|
|
|
- name: Build official preload package
|
|
run: ./scripts/build-official-preload.js --version=${{ github.event.inputs.version }}
|
|
|
|
- name: Release official preload package and Sync to CDN
|
|
uses: galacean/publish@main
|
|
with:
|
|
publish: false
|
|
packages: |
|
|
editor-preload-official
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
NPM_CONFIG_PROVENANCE: true
|
|
OASISBE_UPLOAD_URL: https://oasisbe.alipay.com/api/file/no-auth/crypto/upload
|
|
OASISBE_REQUEST_HEADER: ${{secrets.OASISBE_REQUEST_HEADER}}
|
|
OASISBE_PUBLIC_KEY: ${{secrets.OASISBE_PUBLIC_KEY}}
|
|
|
|
- name: Upload official preload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: editor-preload-official
|
|
path: editor-preload-official/dist/browser.js
|
|
retention-days: 7
|