-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(release): pulling release/2.40.3 into production (#1318)
- Loading branch information
Showing
235 changed files
with
5,313 additions
and
4,136 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,47 @@ | ||
name: Build & Code Quality Checks v3 | ||
|
||
on: | ||
pull_request: | ||
branches: ['develop', 'main', 'hotfix/*'] | ||
types: ['opened', 'reopened', 'synchronize'] | ||
|
||
jobs: | ||
build: | ||
name: Build & Code Quality Checks v3 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
env: | ||
HUSKY: 0 | ||
run: | | ||
npm run setup:ci | ||
- name: Execute quality checks | ||
run: | | ||
npm run check:circular | ||
npm run check:duplicates | ||
- name: Execute security checks | ||
run: | | ||
npm run check:security | ||
- name: Execute bundle size checks | ||
uses: rudderlabs/[email protected] | ||
env: | ||
HUSKY: 0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
install_script: setup:ci | ||
build_script: check:size:build -- --concurrency 1 --scope '@rudderstack/analytics-js' --scope '@rudderstack/analytics-js-common' --scope '@rudderstack/analytics-js-plugins' --scope '@rudderstack/analytics-js-service-worker' --scope 'rudder-sdk-js' | ||
script: npx lerna@6 exec --loglevel=silent --concurrency 1 --scope '@rudderstack/analytics-js' --scope '@rudderstack/analytics-js-common' --scope '@rudderstack/analytics-js-plugins' --scope '@rudderstack/analytics-js-service-worker' --scope 'rudder-sdk-js' -- npm run check:size:json --silent | ||
is_monorepo: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Create new hotfix branch v3 | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
hotfix_name: | ||
description: Hotfix branch name | ||
required: true | ||
|
||
jobs: | ||
create-branch: | ||
name: Create new hotfix branch v3 | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: Create branch | ||
uses: peterjgrainger/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
branch: 'v3-hotfix/${{ github.event.inputs.hotfix_name }}' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Deploy to DEV v3 | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: ['develop'] | ||
types: | ||
- closed | ||
|
||
permissions: | ||
id-token: write # allows the JWT to be requested from GitHub's OIDC provider | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
deploy-tag: | ||
name: Deploy to DEV v3 | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/v3-hotfix/') || startsWith(github.ref, 'refs/heads/develop/') || github.event.pull_request.merged == true | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
role-to-assume: arn:aws:iam::${{ secrets.AWS_DEV_ACCOUNT_ID }}:role/${{ secrets.AWS_DEV_S3_SYNC_ROLE }} | ||
aws-region: us-east-1 | ||
|
||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
env: | ||
HUSKY: 0 | ||
REMOTE_MODULES_BASE_PATH: 'https://cdn.rudderlabs.com/dev/latest/v3/modern/plugins' | ||
BUGSNAG_API_KEY: ${{ secrets.RS_DEV_BUGSNAG_API_KEY }} | ||
BUGSNAG_RELEASE_STAGE: 'development' | ||
run: | | ||
npm run setup:ci | ||
- name: Build files | ||
env: | ||
REMOTE_MODULES_BASE_PATH: 'https://cdn.rudderlabs.com/dev/latest/v3/modern/plugins' | ||
BUGSNAG_API_KEY: ${{ secrets.RS_DEV_BUGSNAG_API_KEY }} | ||
BUGSNAG_RELEASE_STAGE: 'development' | ||
run: | | ||
npm run build:browser | ||
npm run build:browser:modern | ||
- name: Sync files to S3 | ||
run: | | ||
aws s3 cp packages/analytics-js/dist/cdn/legacy/iife/ s3://${{ secrets.AWS_DEV_S3_BUCKET_NAME }}/dev/latest/v3/legacy/ --recursive --cache-control max-age=3600 | ||
aws s3 cp packages/analytics-js/dist/cdn/modern/iife/ s3://${{ secrets.AWS_DEV_S3_BUCKET_NAME }}/dev/latest/v3/modern/ --recursive --cache-control max-age=3600 | ||
aws s3 cp packages/analytics-js-plugins/dist/cdn/legacy/plugins/ s3://${{ secrets.AWS_DEV_S3_BUCKET_NAME }}/dev/latest/v3/legacy/plugins/ --recursive --cache-control max-age=3600 | ||
aws s3 cp packages/analytics-js-plugins/dist/cdn/modern/plugins/ s3://${{ secrets.AWS_DEV_S3_BUCKET_NAME }}/dev/latest/v3/modern/plugins/ --recursive --cache-control max-age=3600 | ||
aws s3 cp packages/analytics-js-integrations/dist/cdn/legacy/js-integrations/ s3://${{ secrets.AWS_DEV_S3_BUCKET_NAME }}/dev/latest/v3/legacy/js-integrations/ --recursive --cache-control max-age=3600 | ||
aws s3 cp packages/analytics-js-integrations/dist/cdn/modern/js-integrations/ s3://${{ secrets.AWS_DEV_S3_BUCKET_NAME }}/dev/latest/v3/modern/js-integrations/ --recursive --cache-control max-age=3600 | ||
aws s3 cp packages/analytics-v1.1/dist/cdn/legacy/rudder-analytics.min.js s3://${{ secrets.AWS_DEV_S3_BUCKET_NAME }}/dev/latest/rudder-analytics.min.js --cache-control max-age=3600 | ||
aws s3 cp packages/analytics-v1.1/dist/cdn/legacy/rudder-analytics.min.js.map s3://${{ secrets.AWS_DEV_S3_BUCKET_NAME }}/dev/latest/rudder-analytics.min.js.map --cache-control max-age=3600 | ||
aws s3 cp packages/analytics-js-integrations/dist/cdn/legacy/js-integrations/ s3://${{ secrets.AWS_DEV_S3_BUCKET_NAME }}/dev/latest/js-integrations/ --recursive --cache-control max-age=3600 | ||
AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DEV_CF_DISTRIBUTION_ID }} --paths "/dev/latest*" |
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,154 @@ | ||
name: Deploy to NPM v3 | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: ['main'] | ||
types: | ||
- closed | ||
|
||
permissions: | ||
id-token: write # allows the JWT to be requested from GitHub's OIDC provider | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
deploy-tag: | ||
name: Deploy to NPM v3 | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/main') || github.event.pull_request.merged == true | ||
steps: | ||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Get new version number | ||
run: | | ||
current_version_v1=$(jq -r .version packages/analytics-v1.1/package.json) | ||
current_version_sw=$(jq -r .version packages/analytics-js-service-worker/package.json) | ||
current_version=$(jq -r .version packages/analytics-js/package.json) | ||
echo "CURRENT_VERSION_V1_VALUE=$current_version_v1" >> $GITHUB_ENV | ||
echo "CURRENT_VERSION_SW_VALUE=$current_version_sw" >> $GITHUB_ENV | ||
echo "CURRENT_VERSION_VALUE=$current_version" >> $GITHUB_ENV | ||
echo "DATE=$(date)" >> $GITHUB_ENV | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
env: | ||
HUSKY: 0 | ||
REMOTE_MODULES_BASE_PATH: 'https://cdn.rudderlabs.com/${{ env.CURRENT_VERSION_VALUE }}/modern/plugins' | ||
BUGSNAG_API_KEY: ${{ secrets.RS_PROD_BUGSNAG_API_KEY }} | ||
BUGSNAG_RELEASE_STAGE: 'production' | ||
run: | | ||
npm run setup:ci | ||
- name: Publish package to NPM | ||
env: | ||
HUSKY: 0 | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
REMOTE_MODULES_BASE_PATH: 'https://cdn.rudderlabs.com/${{ env.CURRENT_VERSION_VALUE }}/modern/plugins' | ||
BUGSNAG_API_KEY: ${{ secrets.RS_PROD_BUGSNAG_API_KEY }} | ||
BUGSNAG_RELEASE_STAGE: 'production' | ||
run: | | ||
npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} | ||
npx lerna@6 publish from-package --no-private --contents dist/npm | ||
- name: Send message to Slack channel for v3 | ||
id: slack | ||
uses: slackapi/[email protected] | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
PROJECT_NAME: 'JS SDK v3 NPM Package' | ||
NPM_PACKAGE_URL: 'https://www.npmjs.com/package/@rudderstack/analytics-js' | ||
with: | ||
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "New release: ${{ env.PROJECT_NAME }}" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Release: <${{ env.NPM_PACKAGE_URL }}|${{ env.CURRENT_VERSION_VALUE }}>*\n${{ env.DATE }}" | ||
} | ||
} | ||
] | ||
} | ||
- name: Send message to Slack channel for v1.1 | ||
id: slackv1 | ||
uses: slackapi/[email protected] | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
PROJECT_NAME: 'JS SDK 1.1 NPM Package' | ||
NPM_PACKAGE_URL: 'https://www.npmjs.com/package/rudder-sdk-js' | ||
with: | ||
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "New release: ${{ env.PROJECT_NAME }}" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Release: <${{ env.NPM_PACKAGE_URL }}|${{ env.CURRENT_VERSION_V1_VALUE }}>*\n${{ env.DATE }}" | ||
} | ||
} | ||
] | ||
} | ||
- name: Send message to Slack channel for Service Worker | ||
id: slackSw | ||
uses: slackapi/[email protected] | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
PROJECT_NAME: 'JS SDK Service Worker NPM Package' | ||
NPM_PACKAGE_URL: 'https://www.npmjs.com/package/@rudderstack/analytics-js-service-worker' | ||
with: | ||
channel-id: ${{ secrets.SLACK_RELEASE_CHANNEL_ID }} | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "New release: ${{ env.PROJECT_NAME }}" | ||
} | ||
}, | ||
{ | ||
"type": "divider" | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*Release: <${{ env.NPM_PACKAGE_URL }}|${{ env.CURRENT_VERSION_SW_VALUE }}>*\n${{ env.DATE }}" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.