Skip to content

[Stream] WebRTC Template Improvements (#4157) #11

[Stream] WebRTC Template Improvements (#4157)

[Stream] WebRTC Template Improvements (#4157) #11

Workflow file for this run

name: Prerelease
on:
push:
branches:
- main
jobs:
prerelease:
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
if: ${{ github.repository_owner == 'cloudflare' }}
name: Build & Publish a beta release to NPM
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8.8.0
- name: Use Node.js 16.18
uses: actions/setup-node@v3
with:
node-version: 16.18
cache: "pnpm"
- name: "Create .env file"
run: |
touch .env
echo TURBO_API=${{ secrets.TURBO_API }} >> .env
echo TURBO_TEAM=${{ secrets.TURBO_TEAM }} >> .env
echo TURBO_TOKEN=${{ secrets.TURBO_TOKEN }} >> .env
echo TURBO_REMOTE_CACHE_SIGNATURE_KEY=${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }} >> .env
- name: Install workerd Dependencies
if: ${{ runner.os == 'Linux' }}
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y libc++1
- name: Install NPM Dependencies
run: pnpm install --frozen-lockfile
- name: Modify package.json version
run: node .github/version-script.js
- name: Build
run: pnpm run build
env:
NODE_ENV: "production"
CI_OS: ${{ runner.os }}
- name: Check for errors
run: pnpm run check
env:
NODE_OPTIONS: "--max_old_space_size=8192"
- name: Publish Beta to NPM
run: pnpm publish --tag beta
env:
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
# this is the "test/staging" key for sparrow analytics
SPARROW_SOURCE_KEY: "5adf183f94b3436ba78d67f506965998"
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
SENTRY_DSN: "https://9edbb8417b284aa2bbead9b4c318918b@sentry10.cfdata.org/583"
ALGOLIA_PUBLIC_KEY: ${{ secrets.ALGOLIA_PUBLIC_KEY }}
working-directory: packages/wrangler
- name: Get Package Version
run: echo "WRANGLER_VERSION=$(npm view wrangler@beta version)" >> $GITHUB_ENV
working-directory: packages/wrangler
publish_prerelease_registry:
timeout-minutes: 30
if: ${{ github.repository_owner == 'cloudflare' }}
name: Publish Prerelease Registry
needs: prerelease
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8.8.0
- name: Use Node.js 16.18
uses: actions/setup-node@v3
with:
node-version: 16.18
cache: "pnpm"
- name: Install workerd Dependencies
if: ${{ runner.os == 'Linux' }}
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y libc++1
- name: Install NPM Dependencies
run: pnpm install --frozen-lockfile
- name: Build wrangler
run: pnpm run build
env:
NODE_ENV: "production"
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_PUBLIC_KEY: ${{ secrets.ALGOLIA_PUBLIC_KEY }}
SENTRY_DSN: "https://9edbb8417b284aa2bbead9b4c318918b@sentry10.cfdata.org/583"
CI_OS: ${{ runner.os }}
- name: Build & Publish Prerelease Registry
run: pnpm run publish
env:
NODE_ENV: "production"
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
working-directory: packages/prerelease-registry