fix: restore server compilation and use isolated bun linker (#11380) #552
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
| name: Release Pieces | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'packages/pieces/**' | |
| - 'packages/shared/**' | |
| concurrency: | |
| group: release-pieces | |
| cancel-in-progress: false | |
| jobs: | |
| Release-Pieces: | |
| if: github.repository == 'activepieces/activepieces' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: bun-${{ hashFiles('bun.lock', 'package.json') }} | |
| restore-keys: bun- | |
| - name: Setup nodejs | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Turbo Cache | |
| uses: rharkor/caching-for-turbo@v2.2.1 | |
| with: | |
| provider: s3 | |
| s3-bucket: ${{ secrets.TURBO_CACHE_S3_BUCKET }} | |
| s3-region: auto | |
| s3-endpoint: ${{ secrets.TURBO_CACHE_S3_ENDPOINT }} | |
| s3-access-key-id: ${{ secrets.TURBO_CACHE_S3_ACCESS_KEY_ID }} | |
| s3-secret-access-key: ${{ secrets.TURBO_CACHE_S3_SECRET_ACCESS_KEY }} | |
| max-age: 2w | |
| max-size: 20gb | |
| - name: copy project .npmrc to user level | |
| run: cp .npmrc $HOME/.npmrc | |
| - name: publish shared package | |
| run: npx turbo run build --filter=@activepieces/shared && npx ts-node -r tsconfig-paths/register -P packages/engine/tsconfig.lib.json tools/scripts/utils/publish-nx-project.ts packages/shared | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: publish pieces-common package | |
| run: npx turbo run build --filter=@activepieces/pieces-common && npx ts-node -r tsconfig-paths/register -P packages/engine/tsconfig.lib.json tools/scripts/utils/publish-nx-project.ts packages/pieces/community/common | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: publish pieces-framework package | |
| run: npx turbo run build --filter=@activepieces/pieces-framework && npx ts-node -r tsconfig-paths/register -P packages/engine/tsconfig.lib.json tools/scripts/utils/publish-nx-project.ts packages/pieces/community/framework | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: build packages | |
| run: npx turbo run build | |
| - name: publish pieces packages | |
| run: npx ts-node -r tsconfig-paths/register -P packages/engine/tsconfig.lib.json tools/scripts/pieces/publish-pieces-to-npm.ts | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Check available memory | |
| run: free -h | |
| - name: update pieces metadata | |
| run: npx ts-node -r tsconfig-paths/register -r ./tools/scripts/fix-dts-require.js -P packages/engine/tsconfig.lib.json tools/scripts/pieces/update-pieces-metadata.ts packages/pieces/community/framework | |
| env: | |
| AP_CLOUD_API_KEY: ${{ secrets.AP_CLOUD_API_KEY }} | |
| NODE_OPTIONS: "--max-old-space-size=8192" | |
| - name: Notify Discord on failure | |
| if: failure() | |
| run: | | |
| curl -H "Content-Type: application/json" \ | |
| -X POST \ | |
| -d "{\"content\": \"🚨 **Release Pieces Workflow Failed** 🚨\\n\\n**Repository:** ${{ github.repository }}\\n**Branch:** ${{ github.ref_name }}\\n**Commit:** ${{ github.sha }}\\n**Action URL:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\\n\\nThe release pieces workflow has failed. Please check the logs for more details.\"}" \ | |
| ${{ secrets.DISCORD_ON_CALL_WEBHOOK }} |