Skip to content

Commit

Permalink
Debug CI
Browse files Browse the repository at this point in the history
  • Loading branch information
HuakunShen committed Jul 3, 2024
1 parent 22df7a0 commit 16d2739
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 31 deletions.
71 changes: 40 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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 }}
Expand Down
10 changes: 10 additions & 0 deletions scripts/init-env.ts
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 16d2739

Please sign in to comment.