Skip to content

add unit test & build & publish actions #27

add unit test & build & publish actions

add unit test & build & publish actions #27

Workflow file for this run

name: build
on:
pull_request:
workflow_dispatch:
jobs:
build-and-upload-artifact:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: read
packages: read
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Add SSH key to chekout a private repo
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.REPO_SSH_KEY }}
- name: Setup 🛠️
uses: ./.github/actions/setup
- name: Build 🔧
run: |
pnpm install
pnpm run lint
pnpm run test
pnpm run build
MY_PATH=$(ls packages/rtc/dist | awk -F/ '{print $NF}')
echo "MY_PATH=$MY_PATH" >> $GITHUB_ENV
- name: Upload Artifact ⬆️
uses: actions/upload-artifact@v3
with:
name: iris-web-rtc
path: ./packages/rtc/dist/${{ env.MY_PATH }}