refactor: delete platform adapter from release action (#2663)

This commit is contained in:
singlecoder
2025-05-16 10:58:47 +08:00
committed by GitHub
parent 62be516b8b
commit 198f6a2aee

View File

@@ -110,49 +110,6 @@ jobs:
cp -r ${{ github.workspace }}/editor/packages/decorators/dist ${{ github.workspace }}/temp/@galacean/editor-decorators
find ${{ github.workspace }}/temp
- name: Ensure Adapter Directory Exists
run: mkdir -p ${{ github.workspace }}/platform-adapter/dist
# Create a mock package.json to specify the path and version of the adapter build result when syncing with the CDN later.
# name is set to @galacean/engine-platform-adapter-release to avoid conflicts with the real package.json
# version is set to the version of the engine package
- name: Create package.json for platform-adapter
run: |
VERSION=$(jq -r '.version' ${{ github.workspace }}/packages/galacean/package.json)
echo "{\"name\": \"@galacean/engine-platform-adapter-release\", \"version\": \"$VERSION\"}" > ${{ github.workspace }}/platform-adapter/package.json
cat ${{ github.workspace }}/platform-adapter/package.json
- name: Bundle polyfill and engine
uses: galacean/platform-adapter@main
env:
ADAPTER_BUNDLE_SETTINGS: |
{
"polyfill": true,
"engine": [
"${{ github.workspace }}/temp/@galacean/engine/dist/browser.js",
"${{ github.workspace }}/temp/@galacean/engine-xr/dist/browser.js",
"${{ github.workspace }}/temp/@galacean/engine-ui/dist/browser.js",
"${{ github.workspace }}/temp/@galacean/engine-shaderlab/dist/browser.js",
"${{ github.workspace }}/temp/@galacean/engine-shader-shaderlab/dist/browser.js",
"${{ github.workspace }}/temp/@galacean/engine-physics-lite/dist/browser.js",
"${{ github.workspace }}/temp/@galacean/engine-physics-physx/dist/browser.js",
"${{ github.workspace }}/temp/@galacean/engine-toolkit/umd/browser.js",
"${{ github.workspace }}/temp/@galacean/engine-lottie/dist/browser.js",
"${{ github.workspace }}/temp/@galacean/engine-spine/dist/browser.js",
"${{ github.workspace }}/temp/@galacean/editor-decorators/dist/browser.js"
],
"wasm": [
"${{ github.workspace }}/packages/physics-physx/libs/physx.release.wasm"
],
"jsWASMLoader": [
"${{ github.workspace }}/packages/physics-physx/libs/physx.release.js"
],
"outputDir": "${{ github.workspace }}/platform-adapter/dist"
}
- name: Print Adapter Bundle
run: find ${{ github.workspace }}/platform-adapter -type f
- name: Release engine packages and Sync to CDN
uses: galacean/publish@main
if: success() || failure()
@@ -162,17 +119,3 @@ jobs:
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: Sync Platform Adapter to CDN
uses: galacean/publish@main
if: success() || failure()
with:
publish: false
packages: |
platform-adapter
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}}