-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
902f2f5
commit 53287ee
Showing
21 changed files
with
261 additions
and
65 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
build/ | ||
**/dist/* | ||
**/node_modules/* | ||
**/coverage/* | ||
**/node_modules/* | ||
pnpm-lock.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Setup | ||
description: Setup Node.js and pnpm | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install pnpm 🤏🏻 | ||
uses: pnpm/action-setup@v2.2.4 | ||
with: | ||
version: latest | ||
|
||
- name: Setup Node 💚 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'pnpm' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
environment: github-pages | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup 🛠️ | ||
uses: ./.github/actions/setup | ||
|
||
- name: Build 🔧 | ||
env: | ||
AGORA_APPID: ${{ secrets.AGORA_APPID }} | ||
run: | | ||
pnpm install | ||
pnpm run lint | ||
pnpm run test | ||
pnpm run build | ||
MY_PATH=$(ls packages/rtc/dist | awk -F/ '{print $NF}') | ||
echo "::set-output name=dist_path::${MY_PATH}" | ||
- name: Upload Artifact ⬆️ | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: agora-rtc-react-docs.zip | ||
path: ${{steps.dist.outputs.dist_path}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: gitleaks | ||
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
scan: | ||
name: gitleaks | ||
runs-on: ubuntu-latest | ||
if: github.actor != 'dependabot[bot]' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: gitleaks/gitleaks-action@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
on: ['pull_request'] | ||
|
||
name: Build and Test PR | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup 🛠️ | ||
uses: ./.github/actions/setup | ||
|
||
- name: Build 🔧 | ||
run: | | ||
pnpm install | ||
pnpm run lint | ||
pnpm run test | ||
pnpm run build | ||
- name: Report Coverage for agora-rtc-react 🟢 | ||
if: always() # Also generate the report if tests are failing | ||
uses: ArtiomTr/jest-coverage-report-action@v2 | ||
with: | ||
custom-title: Coverage report for iris-web-rtc | ||
package-manager: pnpm | ||
working-directory: './packages/rtc' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
package: | ||
type: choice | ||
description: choose package | ||
default: 'iris-web-rtc' | ||
required: true | ||
options: | ||
- iris-web-rtc | ||
- iris-web-rtm | ||
version: | ||
description: x.x.x-semver.x, semver: dev,build | ||
required: true | ||
default: 'patch' | ||
type: string | ||
releases: | ||
description: create Releases, choose false if specify version | ||
default: true | ||
type: boolean | ||
cdn: | ||
description: upload to cdn | ||
default: true | ||
type: boolean | ||
release_type: | ||
description: The release type of CDN | ||
default: 'staging' | ||
type: string | ||
npm: | ||
description: upload to npm | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
release-it: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Setup Dependencies 💚 | ||
run: | | ||
pnpm install | ||
- name: CDN Publish | ||
if: ${{ inputs.cdn }} | ||
run: | | ||
UPLOAD_CDN_INTERNAL_JENKINS_HOOK=${{ inputs.upload_cdn_internal_jenkins_hook }} | ||
UPLOAD_URL=${{ inputs.url }} | ||
RELEASE_TYPE=${{ inputs.release_type }} | ||
curl -X POST ${UPLOAD_CDN_INTERNAL_JENKINS_HOOK} \ | ||
-H "Content-Type: application/json" \ | ||
-H "Accept: application/json" \ | ||
-d "{ \"release\": { \"assets\": [ { \"browser_download_url\": \"${UPLOAD_URL}\", \"release_type\": \"${RELEASE_TYPE}\" } ] }}" | ||
shell: bash | ||
|
||
- name: Setup NPM auth token | ||
if: ${{ inputs.npm }} | ||
run: | | ||
npm set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }} | ||
- name: Config Git | ||
if: ${{ inputs.npm }} | ||
run: | | ||
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | ||
git config --global user.name "${{ github.actor }}" | ||
- name: Update CHANGELOG.md | ||
if: ${{ inputs.npm }} | ||
run: | | ||
pnpm release ${{ inputs.version }} --ci --no-git.tag --no-github.release --npm.allowSameVersion | ||
- name: NPM Publish | ||
if: ${{ inputs.npm }} | ||
run: | | ||
pnpm -F ${{ inputs.package }} release ${{ inputs.version }} --ci --github.release=${{ inputs.releases }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
*.txt | ||
*.pcm | ||
coverage | ||
**/coverage/* | ||
*.log | ||
sdk | ||
tmp | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# ----- BEGIN Agora AppId ----- | ||
[[rules]] | ||
id = "agora-appid" | ||
description = "Agora AppId" | ||
regex = '''"[0-9a-f]{32}"''' | ||
# ----- END Agora AppId ----- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/dist/* | ||
**/coverage/* | ||
**/node_modules/* | ||
pnpm-lock.yaml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# iris-web-rtc |
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './AgoraActionQueue'; | ||
export * from './AgoraConsole'; | ||
export * from './AgoraTool'; | ||
export * from './AgoraTranslate'; |
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
File renamed without changes.
Oops, something went wrong.