-
Notifications
You must be signed in to change notification settings - Fork 28
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
480f853
commit b7d5e76
Showing
2 changed files
with
101 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Publish and deploy alpha versions | ||
|
||
on: | ||
push: | ||
branches: | ||
- publish-alpha | ||
|
||
jobs: | ||
bump_versions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git user | ||
run: | | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config user.name "github-actions[bot]" | ||
- name: Install packages | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Update versions | ||
env: | ||
BUMP: ${{ github.event.inputs.versionBump }} | ||
run: | | ||
yarn global add lerna@5 | ||
lerna -v | ||
echo $(lerna version $BUMP --no-git-tag-version --exact --yes --no-private) | ||
lerna add @100mslive/hms-video-store --peer --scope=@100mslive/hms-virtual-background --exact | ||
lerna add @100mslive/roomkit-react --scope=prebuilt-react-integration --exact | ||
- name: Commit and push changes | ||
run: | | ||
git add . | ||
git commit -m "build: update versions for release" | ||
git push origin HEAD:publish-alpha | ||
publish_packages: | ||
runs-on: ubuntu-latest | ||
needs: bump_versions | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Install packages | ||
run: yarn install | ||
|
||
- name: Test | ||
run: yarn test | ||
|
||
- name: Configure Git user | ||
run: | | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config user.name "github-actions[bot]" | ||
# from-package will publish whatever version is present in each package's package.json | ||
# it will not publish if the version is already published in npm | ||
- name: Publish | ||
run: yarn lerna:publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
PUBLISH_FLAG: alpha | ||
|
||
# Delay to wait for the publish to finish | ||
- name: Delay for 2 minutes | ||
run: sleep 120 | ||
|
||
- name: Repository Dispatch | ||
uses: peter-evans/repository-dispatch@v3 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
repository: 100mslive/100ms-links | ||
event-type: alpha-publish | ||
|
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,22 @@ | ||
name: Update publish-alpha | ||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
pull-request: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: pull-request | ||
uses: repo-sync/pull-request@v2 | ||
if: github.event.pull_request.merged == true | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
source_branch: 'main' | ||
destination_branch: 'publish-alpha' | ||
pr_title: 'Update publish-alpha' | ||
pr_body: ':robot: Automated PR from main to publish-alpha' | ||
pr_label: 'auto-pr' |