-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Showing
13 changed files
with
385 additions
and
167 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: "[Release] connect bump versions" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
semver: | ||
type: choice | ||
description: semver | ||
options: | ||
- patch | ||
- minor | ||
- prerelease | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
bump-versions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Check dependencies to update | ||
run: | | ||
yarn tsx ./ci/scripts/connect-bump-versions.ts ${{ github.event.inputs.semver }} |
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,92 @@ | ||
name: "[Release] connect NPM and v9" | ||
|
||
permissions: | ||
id-token: write # for fetching the OIDC token | ||
contents: read # for actions/checkout | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
commit_sha: | ||
description: "The commit SHA to checkout" | ||
required: true | ||
type: string | ||
deploymentType: | ||
description: "Select the deployment type. (example: canary, stable)" | ||
required: true | ||
type: choice | ||
options: | ||
- canary | ||
- stable | ||
|
||
jobs: | ||
# Version should have been bumped by now thanks to ./ci/scripts/connect-release-init-npm.js | ||
extract-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.set-version.outputs.version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# Number of commits to fetch. 0 indicates all history for all branches and tags. | ||
fetch-depth: 0 | ||
# Checkout the specified commit | ||
ref: ${{ github.event.inputs.commit_sha }} | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
|
||
- name: Extract connect version | ||
id: set-version | ||
run: echo "version=$(node ./ci/scripts/get-connect-version.js)" >> $GITHUB_OUTPUT | ||
|
||
create-push-release-branch: | ||
needs: [extract-version] | ||
name: "Create release branch for version ${{ needs.extract-version.outputs.version }}" | ||
runs-on: ubuntu-latest | ||
outputs: | ||
branch_name: ${{ steps.push-branch.outputs.branch_name }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
# Ensure the full commit history is available is required to get specific `ref`. | ||
fetch-depth: 0 | ||
# Checkout the specified commit | ||
ref: ${{ github.event.inputs.commit_sha }} | ||
|
||
- name: Create and push new branch | ||
env: | ||
BRANCH_NAME: "release/connect/${{ needs.extract-version.outputs.version }}" | ||
run: | | ||
echo ${{ env.BRANCH_NAME }} | ||
git checkout -b ${{ env.BRANCH_NAME }} | ||
git push origin ${{ env.BRANCH_NAME }} | ||
echo "branch_name=${{ env.BRANCH_NAME }}" >> $GITHUB_OUTPUT | ||
trigger-v9-staging-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: gh workflow run .github/workflows/release-connect-v9-staging.yml --ref $BRANCH_NAME | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH_NAME: ${{ needs.create-push-release-branch.outputs.branch_name }} | ||
|
||
trigger-v9-production-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: gh workflow run .github/workflows/release-connect-v9-production.yml --ref ${{ env.BRANCH_NAME }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH_NAME: ${{ needs.create-push-release-branch.outputs.branch_name }} | ||
|
||
trigger-npm-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: gh workflow run .github/workflows/release-connect-npm-init.yml --ref ${{ env.BRANCH_NAME }} --field deploymentType=${{ github.event.inputs.deploymentType }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH_NAME: ${{ needs.create-push-release-branch.outputs.branch_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
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
Oops, something went wrong.