v0.3.3 (#481) #177
Workflow file for this run
This file contains 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 Candidate | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'next-*' | |
jobs: | |
deploy-docs: | |
name: Deploy generated jsdoc | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/next-') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup and Install | |
uses: ./.github/actions/setup-install | |
- name: build docs | |
run: npm run build-docs | |
- name: deploy docs | |
run: | | |
npx netlify deploy --prod \ | |
--site ${{ secrets.NETLIFY_DOC_SITE_ID }} \ | |
--auth ${{ secrets.NETLIFY_AUTH_TOKEN }} \ | |
--dir ./packages/millicast-sdk/docs \ | |
--filter @millicast/sdk | |
build-sdk: | |
name: Build WebSDK | |
runs-on: ubuntu-latest | |
if: ${{ startsWith(github.ref, 'refs/tags/next-') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup and Install | |
uses: ./.github/actions/setup-install | |
- name: build | |
run: npx lerna run build --scope=@millicast/sdk | |
- name: cache SDK build | |
id: cache-sdk-build | |
uses: actions/cache/save@v4 | |
with: | |
path: | | |
packages/millicast-sdk/dist | |
key: ${{ runner.os }}-cache-${{ github.run_id }}-${{ github.run_attempt }}-sdk-dist | |
deploy-multiview-demo: | |
name: Build and Deploy Multiview Demo | |
runs-on: ubuntu-latest | |
needs: build-sdk | |
if: ${{ startsWith(github.ref, 'refs/tags/next-') }} | |
env: | |
MILLICAST_ACCOUNT_ID: ${{ vars.MULTIVIEW_DEMO_ACC_ID }} | |
MILLICAST_STREAM_NAME: ${{ vars.MULTIVIEW_DEMO_STREAM_NAME }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup and Install | |
uses: ./.github/actions/setup-install | |
- name: Restore sdk build | |
uses: actions/cache/restore@v4 | |
with: | |
path: | | |
packages/millicast-sdk/dist | |
key: ${{ runner.os }}-cache-${{ github.run_id }}-${{ github.run_attempt }}-sdk-dist | |
- name: build and deploy | |
run: | | |
cd packages/millicast-multiview-demo | |
npm install | |
npm run build | |
npx netlify deploy --prod --site ${{ secrets.NETLIFY_MULTIVIEW_SITE_ID }} --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} --dir . | |
deploy-publisher-demo: | |
name: Build and Deploy Publisher Demo | |
runs-on: ubuntu-latest | |
needs: build-sdk | |
if: ${{ startsWith(github.ref, 'refs/tags/next-') }} | |
env: | |
MILLICAST_ACCOUNT_ID: ${{ vars.PUBLISHER_DEMO_ACC_ID }} | |
MILLICAST_PUBLISH_TOKEN: ${{ secrets.PUBLISHER_DEMO_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup and Install | |
uses: ./.github/actions/setup-install | |
- name: Restore sdk build | |
uses: actions/cache/restore@v4 | |
with: | |
path: | | |
packages/millicast-sdk/dist | |
key: ${{ runner.os }}-cache-${{ github.run_id }}-${{ github.run_attempt }}-sdk-dist | |
- name: build and deploy app | |
run: | | |
cd packages/millicast-publisher-demo | |
npm install | |
npm run build | |
npx netlify deploy --prod --site ${{ secrets.NETLIFY_PUBLISHER_SITE_ID }} --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} --dir . | |
pulish-next: | |
name: Publish SDK to NPM for next-<version> tag | |
runs-on: ubuntu-latest | |
needs: build-sdk | |
if: ${{ startsWith(github.ref, 'refs/tags/next-') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup and Install | |
uses: ./.github/actions/setup-install | |
- name: Restore sdk build | |
uses: actions/cache/restore@v4 | |
with: | |
path: | | |
packages/millicast-sdk/dist | |
key: ${{ runner.os }}-cache-${{ github.run_id }}-${{ github.run_attempt }}-sdk-dist | |
- name: Add Readme to package | |
run: cp README.md packages/millicast-sdk/README.md | |
- name: publish | |
working-directory: './packages/millicast-sdk' | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
run: | | |
npm publish --tag next |