From 4af0098c7bf3e8d7b47db5ee39a5de25a14e5f41 Mon Sep 17 00:00:00 2001 From: fraisai Date: Wed, 29 Nov 2023 04:52:19 -0500 Subject: [PATCH 1/5] aded multi operating system matrix strategy to cicd --- .github/workflows/npm-publish.yml | 14 ++++++++++++++ .github/workflows/rtconnect-test.yml | 9 ++++----- .github/workflows/slack-notify.yml | 7 +++++-- 3 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..c84c970 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,14 @@ +on: + push: + branches: ["main", "npm-latest-publish"] + pull-request: + branches: ["main", "npm-latest-publish"] + +jobs: + npmPublish: + runs-on: ubuntu-latest + steps: + - name: Publish npm package when version is updated + uses: actions/checkout@v4 + with: + node_version: "20" \ No newline at end of file diff --git a/.github/workflows/rtconnect-test.yml b/.github/workflows/rtconnect-test.yml index d48b98e..730fdb8 100644 --- a/.github/workflows/rtconnect-test.yml +++ b/.github/workflows/rtconnect-test.yml @@ -5,27 +5,26 @@ name: RTConnect CI on: push: - branches: [ "main" ] + branches: [ "main", "feature/raisa-cicd"] pull_request: branches: [ "main" ] jobs: build: - runs-on: ubuntu-latest - strategy: fail-fast: false matrix: - node-version: [15.x, 16.x, 17.x, 18.x] + node-version: [17.x, 18.x] + os: [windows-latest, ubuntu-latest] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + os: ${{ matrix.os}} - run: npm ci - run: npm run build - run: npm run lint diff --git a/.github/workflows/slack-notify.yml b/.github/workflows/slack-notify.yml index b771a26..784c86d 100644 --- a/.github/workflows/slack-notify.yml +++ b/.github/workflows/slack-notify.yml @@ -8,7 +8,7 @@ on: jobs: slackNotification: - name: Slack CI status message + name: Slack CI status - notify on failure runs-on: ubuntu-latest steps: - name: Slack Notify on Failure @@ -21,4 +21,7 @@ jobs: env: SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} # SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - # SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK \ No newline at end of file + # SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + + +# https://github.com/slackapi/slack-github-action \ No newline at end of file From 13162bec3fd3129028a4f861c9945614cb3ff7c6 Mon Sep 17 00:00:00 2001 From: fraisai Date: Wed, 29 Nov 2023 04:53:57 -0500 Subject: [PATCH 2/5] aded multi operating system matrix strategy to cicd --- .github/workflows/rtconnect-test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rtconnect-test.yml b/.github/workflows/rtconnect-test.yml index 730fdb8..b61248d 100644 --- a/.github/workflows/rtconnect-test.yml +++ b/.github/workflows/rtconnect-test.yml @@ -10,21 +10,20 @@ on: branches: [ "main" ] jobs: - build: - runs-on: ubuntu-latest + build_test_lint: strategy: fail-fast: false matrix: - node-version: [17.x, 18.x] + node-version: [17.x, 18.x, 19.x, 20.x] os: [windows-latest, ubuntu-latest] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + runs-on: ${{ matrix.os}} steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - os: ${{ matrix.os}} - run: npm ci - run: npm run build - run: npm run lint From 86195307d2f6c026bc0cee4f65f6bacf048dfd61 Mon Sep 17 00:00:00 2001 From: fraisai Date: Wed, 29 Nov 2023 05:16:28 -0500 Subject: [PATCH 3/5] added workflow to automate npm package publication --- .github/workflows/npm-publish.yml | 10 +++++----- .github/workflows/slack-notify.yml | 2 +- package.json | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index c84c970..adedbf1 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,7 +1,7 @@ on: push: - branches: ["main", "npm-latest-publish"] - pull-request: + branches: ["main", "feature/raisa-cicd", "npm-latest-publish"] + pull_request: branches: ["main", "npm-latest-publish"] jobs: @@ -9,6 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Publish npm package when version is updated - uses: actions/checkout@v4 - with: - node_version: "20" \ No newline at end of file + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/slack-notify.yml b/.github/workflows/slack-notify.yml index 784c86d..0b1f7d0 100644 --- a/.github/workflows/slack-notify.yml +++ b/.github/workflows/slack-notify.yml @@ -2,7 +2,7 @@ name: Slack Notification of CI Status on: push: - branches: ["main"] + branches: ["main", "feature/raisa-cicd"] pull_request: branches: ["main"] diff --git a/package.json b/package.json index 296de7c..29dc11a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "rtconnect", - "version": "0.0.54", + "name": "rtc-test-run", + "version": "0.1.6", "description": "A lightweight React library to set up live streaming and real-time video calls with peers.", "main": "./dist/src/index.js", "types": "./dist/src/index.d.ts", From a90933cb641526dfe71842613359a7d09db203e3 Mon Sep 17 00:00:00 2001 From: fraisai Date: Wed, 29 Nov 2023 05:28:24 -0500 Subject: [PATCH 4/5] added workflow to automate npm package publishing --- .github/workflows/npm-publish.yml | 8 +++++++- package.json | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index adedbf1..f6e36ef 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,7 +8,13 @@ jobs: npmPublish: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: "20" + - run: npm ci - name: Publish npm package when version is updated uses: JS-DevTools/npm-publish@v3 with: - token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + token: ${{ secrets.NPM_TOKEN }} + strategy: upgrade \ No newline at end of file diff --git a/package.json b/package.json index 29dc11a..3c18108 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "rtc-test-run", - "version": "0.1.6", + "name": "rtconnect", + "version": "0.0.55", "description": "A lightweight React library to set up live streaming and real-time video calls with peers.", "main": "./dist/src/index.js", "types": "./dist/src/index.d.ts", From 331855249f1ab2a148cdd6ee20eebaa192dfada3 Mon Sep 17 00:00:00 2001 From: fraisai Date: Wed, 29 Nov 2023 05:35:11 -0500 Subject: [PATCH 5/5] added workflow to automate npm package publishing --- .github/workflows/npm-publish.yml | 9 +++++++-- .github/workflows/rtconnect-test.yml | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index f6e36ef..0540015 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,6 +1,8 @@ +name: Automate NPM Package Publish + on: push: - branches: ["main", "feature/raisa-cicd", "npm-latest-publish"] + branches: ["main", "npm-latest-publish"] pull_request: branches: ["main", "npm-latest-publish"] @@ -17,4 +19,7 @@ jobs: uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_TOKEN }} - strategy: upgrade \ No newline at end of file + strategy: upgrade + + +# https://github.com/JS-DevTools/npm-publish \ No newline at end of file diff --git a/.github/workflows/rtconnect-test.yml b/.github/workflows/rtconnect-test.yml index b61248d..aac8a4c 100644 --- a/.github/workflows/rtconnect-test.yml +++ b/.github/workflows/rtconnect-test.yml @@ -5,7 +5,7 @@ name: RTConnect CI on: push: - branches: [ "main", "feature/raisa-cicd"] + branches: [ "main"] pull_request: branches: [ "main" ]