diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9033fbb74..80ecafe88 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,7 @@ updates: schedule: interval: weekly day: 'sunday' - target-branch: 'chore/dependabot' + target-branch: 'main' labels: ['dependabot', 'dependencies'] open-pull-requests-limit: 10 commit-message: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 62e9a5fa2..45158ec91 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -263,20 +263,20 @@ jobs: name: npm-logs path: ~/.npm/_logs - build-master: - name: Get Bundle Size from Master + build-main: + name: Get Bundle Size from Main runs-on: ubuntu-latest needs: build-bundle outputs: - bundledMaster: ${{ steps.set-bundled-master.outputs.bundledMaster }} - bundledMasterHuman: ${{ steps.set-bundled-master.outputs.bundledMasterHuman }} + bundledMain: ${{ steps.set-bundled-main.outputs.bundledMain }} + bundledMainHuman: ${{ steps.set-bundled-main.outputs.bundledMainHuman }} steps: - - name: Checkout Master + - name: Checkout Main uses: actions/checkout@v6 with: - ref: master + ref: main - name: NPM install uses: actions/setup-node@v6 @@ -288,16 +288,16 @@ jobs: - name: Report Bundle Size run: | - BUNDLED_MASTER=$(ls -l dist/mparticle.min.js.gz | awk '{print $5}') - echo "BUNDLED_MASTER=$BUNDLED_MASTER" >> $GITHUB_ENV - BUNDLED_MASTER_HUMAN=$(ls -lh dist/mparticle.min.js.gz | awk '{print $5}') - echo "BUNDLED_MASTER_HUMAN=$BUNDLED_MASTER_HUMAN" >> $GITHUB_ENV + BUNDLED_MAIN=$(ls -l dist/mparticle.min.js.gz | awk '{print $5}') + echo "BUNDLED_MAIN=$BUNDLED_MAIN" >> $GITHUB_ENV + BUNDLED_MAIN_HUMAN=$(ls -lh dist/mparticle.min.js.gz | awk '{print $5}') + echo "BUNDLED_MAIN_HUMAN=$BUNDLED_MAIN_HUMAN" >> $GITHUB_ENV - - name: Set Master Bundled Size - id: set-bundled-master + - name: Set Main Bundled Size + id: set-bundled-main run: | - echo "::set-output name=bundledMaster::${{ env.BUNDLED_MASTER }}" - echo "::set-output name=bundledMasterHuman::${{ env.BUNDLED_MASTER_HUMAN }}" + echo "::set-output name=bundledMain::${{ env.BUNDLED_MAIN }}" + echo "::set-output name=bundledMainHuman::${{ env.BUNDLED_MAIN_HUMAN }}" - name: Archive npm failure logs uses: actions/upload-artifact@v6 @@ -310,26 +310,26 @@ jobs: name: Calculate Bundled Diff uses: ./.github/workflows/calculate-difference.yml needs: - - build-master + - build-main - build-local with: - initial_bundle_size: ${{ needs.build-master.outputs.bundledMaster }} + initial_bundle_size: ${{ needs.build-main.outputs.bundledMain }} updated_bundle_size: ${{ needs.build-local.outputs.bundledLocal }} generate-report: name: Generate Report runs-on: ubuntu-latest needs: - - build-master + - build-main - build-local - calculate-bundled steps: - name: Adding Markdown run: | echo '### Calculate Bundle Size Difference' >> $GITHUB_STEP_SUMMARY - echo "| | master | current | % changed |" >> $GITHUB_STEP_SUMMARY + echo "| | main | current | % changed |" >> $GITHUB_STEP_SUMMARY echo "|--|--|--|--|" >> $GITHUB_STEP_SUMMARY - echo "| mparticle.min.js.gz | ${{ needs.build-master.outputs.bundledMasterHuman }} | ${{ needs.build-local.outputs.bundledLocalHuman }} | ${{ needs.calculate-bundled.outputs.diff_percent }} |" >> $GITHUB_STEP_SUMMARY + echo "| mparticle.min.js.gz | ${{ needs.build-main.outputs.bundledMainHuman }} | ${{ needs.build-local.outputs.bundledLocalHuman }} | ${{ needs.calculate-bundled.outputs.diff_percent }} |" >> $GITHUB_STEP_SUMMARY automerge-dependabot: name: 'Save PR Number for Dependabot Automerge' diff --git a/.github/workflows/staging-step-1.yml b/.github/workflows/release-step-1.yml similarity index 65% rename from .github/workflows/staging-step-1.yml rename to .github/workflows/release-step-1.yml index 9fbd86f3e..17866cfde 100644 --- a/.github/workflows/staging-step-1.yml +++ b/.github/workflows/release-step-1.yml @@ -1,45 +1,37 @@ -name: 'Staging Release - Step 1: Prepare CDN Pre-Release, Publish NPM' +name: 'Release - Step 1: Staging' on: - workflow_dispatch: - inputs: - dryRun: - description: 'Do a dry run to preview instead of a real release [true/false]' - required: true - type: boolean - default: true + push: + branches: [main] + +# Prevent race between staging and release workflows +concurrency: + group: staging-pipeline + cancel-in-progress: false jobs: - # SDK staging release must be done from the staging branch - confirm-staging-branch: - name: Confirm release is run on staging + # Guard: skip when release commits land on main (they contain [skip ci]) + check-skip: + name: Check for skip ci runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - - name: Git checkout - uses: actions/checkout@v6 - - - name: Branch Check - run: | - BRANCHNAME=${GITHUB_REF##*/} - if [ $BRANCHNAME != "staging" ]; then - echo "You can only run a staging release from the staging branch, you are trying to run it from ${BRANCHNAME}" - exit 1 - fi + - run: echo "Proceeding with staging pipeline" build-bundle: name: Build Distribution Bundle runs-on: ubuntu-latest - needs: confirm-staging-branch + needs: check-skip steps: - name: Checkout uses: actions/checkout@v6 with: - ref: development + fetch-depth: 0 - name: NPM install uses: actions/setup-node@v6 with: - node-version: 24.x + node-version: latest - name: Run NPM CI run: npm ci @@ -53,9 +45,6 @@ jobs: - name: Run Build IIFE run: npm run build:iife - - name: Display Bundle Diff, but Fancy! - run: git diff --unified=3 dist/mparticle.js | npx diff-so-fancy - - name: Archive npm failure logs uses: actions/upload-artifact@v6 if: failure() @@ -68,9 +57,10 @@ jobs: test-jest: name: 'Test Jest' runs-on: 'ubuntu-latest' + needs: check-skip strategy: matrix: - node-version: [16.x, 17.x, 18.x, 19.x, 20.x, 21.x, 22.x, 23.x, 24.x, 25.x] + node-version: [18.x, 19.x, 20.x, 21.x, 22.x, 23.x, 24.x, 25.x] steps: - name: Checkout uses: actions/checkout@v6 @@ -107,7 +97,7 @@ jobs: build_command: npm run build:iife branch_name: ${{ vars.GITHUB_SHA }} - # Test Sub can be run independent of other tests + # Test Stub can be run independent of other tests test-stub: name: 'Test Stub' runs-on: ubuntu-latest @@ -122,7 +112,7 @@ jobs: - name: NPM install uses: actions/setup-node@v6 with: - node-version: 24.x + node-version: latest - name: Run NPM CI run: npm ci @@ -223,101 +213,48 @@ jobs: branch_name: ${{ vars.GITHUB_SHA }} build_command: npm run build:esm && npm run build:test-bundle - create-release-branch: - name: Create release branch + # After all tests pass, reset staging branch to main + built dist/ + update-staging: + name: Update Staging Branch runs-on: ubuntu-latest needs: - test-core - test-stub + - test-integrations-require-js - test-integrations-common-js-browserfy - test-integrations-common-js-webpack - test-integrations-common-js-rollup - test-integrations-module-js-webpack - test-integrations-module-js-rollup - - test-integrations-require-js - - confirm-staging-branch - steps: - - name: Checkout development branch - uses: actions/checkout@v6 - with: - repository: mparticle/mparticle-web-sdk - ref: development - - - name: Create and push release branch - run: | - git checkout -b release/${{ github.run_number }} - git push origin release/${{ github.run_number }} - - release: - name: Perform Release - runs-on: ubuntu-latest - needs: - - create-release-branch - - # OIDC permissions for npm trusted publishing - permissions: - contents: write - issues: write - pull-requests: write - id-token: write env: - GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }} GIT_AUTHOR_NAME: mparticle-automation GIT_AUTHOR_EMAIL: developers@mparticle.com GIT_COMMITTER_NAME: mparticle-automation GIT_COMMITTER_EMAIL: developers@mparticle.com steps: - - name: Checkout staging branch + - name: Checkout main uses: actions/checkout@v6 with: fetch-depth: 0 - ref: staging - - - name: Import GPG Key - uses: crazy-max/ghaction-import-gpg@e00cb83a68c1158b29afc5217dd0582cada6d172 #v4.4.0 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - git_user_signingkey: true - git_commit_gpgsign: true - - - name: Merge release branch into staging branch - run: | - git pull origin release/${{ github.run_number }} + ref: main + token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }} - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version: 24.x - registry-url: 'https://registry.npmjs.org' + node-version: latest - name: Install dependencies run: npm ci - - name: Verify npm version - run: npm --version - - - name: Release --dry-run - if: ${{ github.event.inputs.dryRun == 'true'}} - run: | - npx semantic-release --branches staging --dry-run - - # NPM Publish happens here - - name: Release - if: ${{ github.event.inputs.dryRun == 'false'}} - run: | - npx semantic-release --branches staging - - - name: Archive npm failure logs - uses: actions/upload-artifact@v6 - if: failure() - with: - name: npm-logs - path: ~/.npm/_logs + - name: Build distribution bundle + run: npm run build - - name: Push automated release commits to release branch - if: ${{ github.event.inputs.dryRun == 'false' }} + - name: Reset staging to main and add dist run: | - git push origin HEAD:release/${{ github.run_number }} + git checkout -B staging + git add dist -f + git commit -m 'chore(build): Generate latest bundle [skip ci]' + git push origin staging --force diff --git a/.github/workflows/staging-step-2.yml b/.github/workflows/release-step-2.yml similarity index 88% rename from .github/workflows/staging-step-2.yml rename to .github/workflows/release-step-2.yml index 02926a3d2..ae36fd5f3 100644 --- a/.github/workflows/staging-step-2.yml +++ b/.github/workflows/release-step-2.yml @@ -1,4 +1,8 @@ -name: 'Staging Release - Step 2: Publish SDK Release to Release Order Branch' +name: 'Release - Step 2: Release Order' + +# Run AFTER Step 1 (Staging) has updated the staging branch. +# Pushes the staging branch to a release-order branch for CDN deployment. +# Run Step 3 after this to generate release notes and publish to NPM. on: workflow_dispatch: @@ -30,7 +34,7 @@ jobs: ref: ${{ github.event.inputs.releaseOrderBranch }} push-release-branch: - name: Release staging to ${{ github.event.inputs.releaseOrderBranch}} + name: Release staging to ${{ github.event.inputs.releaseOrderBranch }} needs: - verify-release-order-branch runs-on: ubuntu-latest diff --git a/.github/workflows/release-step-3.yml b/.github/workflows/release-step-3.yml new file mode 100644 index 000000000..ac3eaabc5 --- /dev/null +++ b/.github/workflows/release-step-3.yml @@ -0,0 +1,90 @@ +name: 'Release - Step 3: Generate Release Notes, Publish to NPM and CDN' + +on: + workflow_dispatch: + inputs: + dryRun: + description: 'Do a dry run to preview instead of a real release [true/false]' + required: true + default: 'true' + +# Prevent race between staging and release workflows +concurrency: + group: staging-pipeline + cancel-in-progress: false + +jobs: + confirm-staging-branch: + name: Confirm release is run from staging + runs-on: ubuntu-latest + steps: + - name: Branch Check + run: | + if [ "${{ github.ref_name }}" != "staging" ]; then + echo "Release must be run from the staging branch, not '${{ github.ref_name }}'" + exit 1 + fi + + release: + name: Perform Release + runs-on: ubuntu-latest + needs: confirm-staging-branch + + # OIDC permissions for npm trusted publishing + permissions: + contents: write + issues: write + pull-requests: write + id-token: write + + env: + GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }} + GIT_AUTHOR_NAME: mparticle-automation + GIT_AUTHOR_EMAIL: developers@mparticle.com + GIT_COMMITTER_NAME: mparticle-automation + GIT_COMMITTER_EMAIL: developers@mparticle.com + + steps: + - name: Checkout staging branch + uses: actions/checkout@v6 + with: + fetch-depth: 0 + ref: staging + token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }} + + - name: Import GPG Key + uses: crazy-max/ghaction-import-gpg@e00cb83a68c1158b29afc5217dd0582cada6d172 #v4.4.0 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + git_user_signingkey: true + git_commit_gpgsign: true + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: latest + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: npm ci + + - name: Release --dry-run + if: ${{ github.event.inputs.dryRun == 'true' }} + run: npx semantic-release --dry-run + + # NPM Publish happens here via OIDC trusted publishing + - name: Release + if: ${{ github.event.inputs.dryRun == 'false' }} + run: npx semantic-release + + - name: Archive npm failure logs + uses: actions/upload-artifact@v6 + if: failure() + with: + name: npm-logs + path: ~/.npm/_logs + + - name: Push release commits to main + if: ${{ github.event.inputs.dryRun == 'false' }} + run: git push origin HEAD:main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 4e175cff1..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,334 +0,0 @@ -name: Release SDK - -on: - workflow_dispatch: - inputs: - dryRun: - description: 'Do a dry run to preview instead of a real release [true/false]' - required: true - type: boolean - default: true - -jobs: - # SDK release is done from master branch. - confirm-public-repo-master-branch: - name: 'Confirm release is run from public/master branch' - uses: mParticle/mparticle-workflows/.github/workflows/sdk-release-repo-branch-check.yml@main - - build-bundle: - name: Build Distribution Bundle - runs-on: ubuntu-latest - needs: confirm-public-repo-master-branch - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - ref: development - - - name: NPM install - uses: actions/setup-node@v6 - with: - node-version: latest - - - name: Run NPM CI - run: npm ci - - - name: Lint with ESLint - run: npm run lint - - - name: Lint with Prettier - run: npm run prettier - - - name: Run Build IIFE - run: npm run build:iife - - - name: Display Bundle Diff, but Fancy! - run: git diff --unified=3 dist/mparticle.js | npx diff-so-fancy - - - name: Archive npm failure logs - uses: actions/upload-artifact@v6 - if: failure() - with: - name: npm-logs - path: ~/.npm/_logs - - # Currently, we're only using Jest to test TypeScript modules - # and they do not require any built files - test-jest: - name: 'Test Jest' - runs-on: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: NPM install - uses: actions/setup-node@v6 - with: - node-version: latest - - - name: Run NPM CI - run: npm ci - - - name: Run Jest Tests - run: npm run test:jest - - - name: Archive npm failure logs - uses: actions/upload-artifact@v6 - if: failure() - with: - name: npm-logs - path: ~/.npm/_logs - - # Only Core test requires bundle, but we want to make sure - # that tests only run when the bundle is successfully built - test-core: - name: Core Tests - uses: mParticle/mparticle-workflows/.github/workflows/web-run-test.yml@main - needs: - - test-jest - - build-bundle - with: - test_command_label: Core SDK Tests - test_command: npm run test - build_command: npm run build:iife - branch_name: ${{ vars.GITHUB_SHA }} - - # Test Sub can be run independent of other tests - test-stub: - name: 'Test Stub' - runs-on: ubuntu-latest - needs: - - test-core - - test-jest - - build-bundle - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: NPM install - uses: actions/setup-node@v6 - with: - node-version: latest - - - name: Run NPM CI - run: npm ci - - - name: Install Firefox Latest - uses: browser-actions/setup-firefox@latest - - - name: Log Firefox Version - run: firefox --version - - - name: Run Stub Tests - run: npm run test:stub - - - name: Archive npm failure logs - uses: actions/upload-artifact@v6 - if: failure() - with: - name: npm-logs - path: ~/.npm/_logs - - # Integration Tests run the same suite of tests against various build systems - # to make sure our SDK will run in different environments - - test-integrations-require-js: - name: 'Integration Tests: Require JS' - uses: mParticle/mparticle-workflows/.github/workflows/web-run-test.yml@main - needs: - - test-core - - test-jest - - build-bundle - with: - test_command_label: Require JS Test - test_command: npm run test:requirejs - branch_name: ${{ vars.GITHUB_SHA }} - - test-integrations-common-js-browserfy: - name: 'Integration Tests: Browserfy Common JS' - uses: mParticle/mparticle-workflows/.github/workflows/web-run-test.yml@main - needs: - - test-core - - test-jest - - build-bundle - with: - test_command_label: Browserfy CJS Test - test_command: npm run test:integrations:cjs:browserfy - branch_name: ${{ vars.GITHUB_SHA }} - build_command: npm run build:npm && npm run build:test-bundle - - test-integrations-common-js-webpack: - name: 'Integration Tests: webpack Common JS' - uses: mParticle/mparticle-workflows/.github/workflows/web-run-test.yml@main - needs: - - test-core - - test-jest - - build-bundle - with: - test_command_label: webpack CJS Test - test_command: npm run test:integrations:cjs:webpack - branch_name: ${{ vars.GITHUB_SHA }} - build_command: npm run build:npm && npm run build:test-bundle - - test-integrations-common-js-rollup: - name: 'Integration Tests: Rollup Common JS' - uses: mParticle/mparticle-workflows/.github/workflows/web-run-test.yml@main - needs: - - test-core - - test-jest - - build-bundle - with: - test_command_label: Rollup CJS Test - test_command: npm run test:integrations:cjs:rollup - branch_name: ${{ vars.GITHUB_SHA }} - build_command: npm run build:npm && npm run build:test-bundle - - test-integrations-module-js-webpack: - name: 'Integration Tests: webpack Module JS' - uses: mParticle/mparticle-workflows/.github/workflows/web-run-test.yml@main - needs: - - test-core - - test-jest - - build-bundle - with: - test_command_label: webpack Module Test - test_command: npm run test:integrations:module:webpack - branch_name: ${{ vars.GITHUB_SHA }} - build_command: npm run build:esm && npm run build:test-bundle - - test-integrations-module-js-rollup: - name: 'Integration Tests: Rollup Module JS' - uses: mParticle/mparticle-workflows/.github/workflows/web-run-test.yml@main - needs: - - test-core - - test-jest - - build-bundle - with: - test_command_label: Rollup Module Test - test_command: npm run test:integrations:module:rollup - branch_name: ${{ vars.GITHUB_SHA }} - build_command: npm run build:esm && npm run build:test-bundle - - create-release-branch: - name: Create release branch - runs-on: ubuntu-latest - needs: - - test-core - - test-stub - - test-integrations-common-js-browserfy - - test-integrations-common-js-webpack - - test-integrations-common-js-rollup - - test-integrations-module-js-webpack - - test-integrations-module-js-rollup - - test-integrations-require-js - - confirm-public-repo-master-branch - steps: - - name: Checkout development branch - uses: actions/checkout@v6 - with: - repository: mparticle/mparticle-web-sdk - ref: development - - - name: Create and push release branch - run: | - git checkout -b release/${{ github.run_number }} - git push origin release/${{ github.run_number }} - - release: - name: Perform Release - runs-on: ubuntu-latest - needs: - - create-release-branch - - # OIDC permissions for npm trusted publishing - permissions: - id-token: write - contents: read - - env: - GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }} - GIT_AUTHOR_NAME: mparticle-automation - GIT_AUTHOR_EMAIL: developers@mparticle.com - GIT_COMMITTER_NAME: mparticle-automation - GIT_COMMITTER_EMAIL: developers@mparticle.com - - steps: - - name: Checkout public master branch - uses: actions/checkout@v6 - with: - fetch-depth: 0 - ref: master - - - name: Import GPG Key - uses: crazy-max/ghaction-import-gpg@e00cb83a68c1158b29afc5217dd0582cada6d172 #v4.4.0 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - git_user_signingkey: true - git_commit_gpgsign: true - - - name: Merge release branch into master branch - run: | - git pull origin release/${{ github.run_number }} - - - name: Setup Node.js - uses: actions/setup-node@v6 - with: - node-version: latest - registry-url: 'https://registry.npmjs.org' - - - name: Install dependencies - run: npm ci - - - name: Release --dry-run - if: ${{ github.event.inputs.dryRun == 'true'}} - run: | - npx semantic-release --dry-run - - # NPM Publish happens here via OIDC trusted publishing - - name: Release - if: ${{ github.event.inputs.dryRun == 'false'}} - run: | - npx semantic-release - - - name: Archive npm failure logs - uses: actions/upload-artifact@v6 - if: failure() - with: - name: npm-logs - path: ~/.npm/_logs - - - name: Push automated release commits to release branch - if: ${{ github.event.inputs.dryRun == 'false' }} - run: | - git push origin HEAD:release/${{ github.run_number }} - - sync-repository: - name: Sync repositories - needs: release - runs-on: ubuntu-latest - steps: - - name: Checkout master branch - uses: actions/checkout@v6 - with: - fetch-depth: 0 - repository: ${{ github.repository }} - token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }} - ref: master - - - name: Merge release branch into master branch - if: ${{ github.event.inputs.dryRun == 'false' }} - run: | - git pull origin release/${{ github.run_number }} - - - name: Push release commits to main, master and development branches - if: ${{ github.event.inputs.dryRun == 'false' }} - run: | - git push origin HEAD:development - git push origin HEAD:master - git push origin HEAD:main - - - name: Delete release branch - if: ${{ github.event.inputs.dryRun == 'false' }} - run: | - git push --delete origin release/${{ github.run_number }} diff --git a/.github/workflows/reusable-workflows.yml b/.github/workflows/reusable-workflows.yml index 7279f90ea..f7c959172 100644 --- a/.github/workflows/reusable-workflows.yml +++ b/.github/workflows/reusable-workflows.yml @@ -10,11 +10,8 @@ jobs: pr-title-check: name: Check PR for semantic title uses: mParticle/mparticle-workflows/.github/workflows/pr-title-check.yml@stable - pr-branch-target-gitflow: - name: Check PR for semantic target branch - uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-target-gitflow.yml@stable security-lint-checks: name: Security Lint Checks uses: mparticle/mparticle-workflows/.github/workflows/security-checks.yml@stable with: - base_branch: "development" \ No newline at end of file + base_branch: "main" diff --git a/.github/workflows/staging-step-3.yml b/.github/workflows/staging-step-3.yml deleted file mode 100644 index 0ed591439..000000000 --- a/.github/workflows/staging-step-3.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: "Staging Release - Step 3: Release to CDN and Synchronize Branches" - -on: - workflow_dispatch: - -jobs: - synchronize-branches: - name: Synchronize SDK to all branches - runs-on: ubuntu-latest - env: - GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }} - GIT_AUTHOR_NAME: mparticle-automation - GIT_AUTHOR_EMAIL: developers@mparticle.com - GIT_COMMITTER_NAME: mparticle-automation - GIT_COMMITTER_EMAIL: developers@mparticle.com - - steps: - - name: Checkout staging branch - uses: actions/checkout@v6 - with: - fetch-depth: 0 - repository: ${{ github.repository }} - token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }} - ref: staging - - - name: Push release commits to development - run: | - git push origin HEAD:development - - # We will eventually replace master with main - - name: Push release commits to main and master - run: | - git push origin HEAD:master - git push origin HEAD:main - - - name: Push release commits to Release Order Branches - run: | - git push origin HEAD:release-order-a - git push origin HEAD:release-order-b - git push origin HEAD:release-order-c \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0e0ec31ca..5ef98c481 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ Thanks for contributing! Please read this document to follow our conventions for ## Setting Up - Fork the repository and then clone down your fork -- Commit your code per the conventions below, and PR into the mParticle SDK `master` branch +- Commit your code per the conventions below, and PR into the mParticle SDK `main` branch - Your PR title will be checked automatically against the below convention (view the commit history to see examples of a proper commit/PR title). If it fails, you must update your title. - Our engineers will work with you to get your code change implemented once a PR is up diff --git a/release.config.js b/release.config.js index b360f6a41..39a1ebe69 100644 --- a/release.config.js +++ b/release.config.js @@ -1,5 +1,5 @@ module.exports = { - branches: ['master'], + branches: ['staging'], tagFormat: 'v${version}', repositoryUrl: 'https://github.com/mParticle/mparticle-web-sdk', plugins: [