diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5cb9d77c..4e854c41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,33 +9,33 @@ on: workflow_dispatch: jobs: - build-radix-vue: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: "true" - - uses: pnpm/action-setup@v4 - - name: Use Node.js 20 - uses: actions/setup-node@v3 - with: - node-version: 20 - cache: "pnpm" - - name: Build radix-vue - working-directory: vendors/radix-vue - env: - COREPACK_ENABLE_STRICT: 0 - run: | - pnpm i - pnpm build - - name: Upload `dist` folder - uses: actions/upload-artifact@v4 - with: - name: radix-vue-dist - path: vendors/radix-vue/packages/radix-vue/dist + # build-radix-vue: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # with: + # submodules: "true" + # - uses: pnpm/action-setup@v4 + # - name: Use Node.js 20 + # uses: actions/setup-node@v3 + # with: + # node-version: 20 + # cache: "pnpm" + # - name: Build radix-vue + # working-directory: vendors/radix-vue + # env: + # COREPACK_ENABLE_STRICT: 0 + # run: | + # pnpm i + # pnpm build + # - name: Upload `dist` folder + # uses: actions/upload-artifact@v4 + # with: + # name: radix-vue-dist + # path: vendors/radix-vue/packages/radix-vue/dist build: runs-on: ubuntu-latest - needs: build-radix-vue + # needs: build-radix-vue strategy: matrix: @@ -46,10 +46,10 @@ jobs: - uses: actions/checkout@v4 with: submodules: "true" - - uses: actions/download-artifact@v4 - with: - name: radix-vue-dist - path: vendors/radix-vue/packages/radix-vue/dist + # - uses: actions/download-artifact@v4 + # with: + # name: radix-vue-dist + # path: vendors/radix-vue/packages/radix-vue/dist - uses: pnpm/action-setup@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 @@ -61,13 +61,22 @@ jobs: - uses: oven-sh/setup-bun@v1 with: bun-version: 1.1.17 - - - name: Install Dependencies + - name: Init Environment Variables env: SUPABASE_URL: ${{ secrets.SUPABASE_URL }} SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }} SUPABASE_GRAPHQL_ENDPOINT: ${{ secrets.SUPABASE_GRAPHQL_ENDPOINT }} + run: | + bun scripts/init-env.ts + - name: Install Dependencies run: pnpm i + - name: Build radix-vue + working-directory: vendors/radix-vue + env: + COREPACK_ENABLE_STRICT: 0 + run: | + pnpm i + pnpm build - name: Build env: SUPABASE_GRAPHQL_ENDPOINT: ${{ secrets.SUPABASE_GRAPHQL_ENDPOINT }} diff --git a/scripts/init-env.ts b/scripts/init-env.ts new file mode 100644 index 00000000..40480369 --- /dev/null +++ b/scripts/init-env.ts @@ -0,0 +1,10 @@ +// write SUPABASE_ANON_KEY env to .env +import { writeFileSync } from 'fs'; +import { resolve } from 'path'; + +const envContent = `SUPABASE_ANON_KEY=${process.env.SUPABASE_ANON_KEY} +SUPABASE_GRAPHQL_ENDPOINT=${process.env.SUPABASE_GRAPHQL_ENDPOINT} +SUPABASE_URL=${process.env.SUPABASE_URL} +`; +writeFileSync(resolve(__dirname, '../apps/desktop/.env'), envContent); +writeFileSync(resolve(__dirname, '../packages/gql/.env'), envContent);