diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2adb07..64771e7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,12 +20,16 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: prepare + env: + APP_ID: ${{ secrets.APP_ID }} + SECRET: ${{ secrets.SECRET }} run: | sudo apt-get update sudo apt-get -y install build-essential git gobject-introspection libgirepository1.0-dev libcairo2 libcairo2-dev libavdevice-dev libavfilter-dev libopus-dev libvpx-dev pkg-config libsrtp2-dev libasound2-dev libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-pulseaudio gir1.2-gstreamer-1.0 sudo corepack enable npm npm i npm run submodule:install + npx zx ./scripts/create_env.mjs - name: test env: CI: true diff --git a/scripts/create_env.mjs b/scripts/create_env.mjs new file mode 100644 index 0000000..051cbec --- /dev/null +++ b/scripts/create_env.mjs @@ -0,0 +1,11 @@ +import { writeFileSync } from 'fs'; + +const { APP_ID, SECRET } = process.env; + +writeFileSync( + 'env.ts', + `export const appId = '${APP_ID}'; + +export const secret = '${SECRET}'; +` +);