chore: release v1.6.0-alpha.2 #358
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a basic workflow to help you get started with Actions | |
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| build_official_preload: | |
| description: 'Build and publish official preload package' | |
| type: boolean | |
| default: true | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Checkout Engine repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: true | |
| # after pnpm | |
| - name: Use Node.js LTS | |
| 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-editor-preload.js | |
| chmod +x ./scripts/build-official-preload.js | |
| # Build and publish official preload package | |
| - name: Build official preload package | |
| if: ${{ github.event.inputs.build_official_preload == '' || github.event.inputs.build_official_preload == 'true' }} | |
| run: ./scripts/build-official-preload.js | |
| - name: Release engine packages and Sync to CDN | |
| uses: galacean/publish@main | |
| if: success() || failure() | |
| 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: Release official preload package and Sync to CDN | |
| if: ${{ github.event.inputs.build_official_preload == '' || github.event.inputs.build_official_preload == 'true' }} | |
| 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 | |
| if: ${{ github.event.inputs.build_official_preload == '' || github.event.inputs.build_official_preload == 'true' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: editor-preload-official | |
| path: editor-preload-official/dist/browser.js | |
| retention-days: 7 |