Skip to content

Commit

Permalink
Update release-guide.md (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
AhyoungRyu authored Apr 26, 2024
1 parent 83771b2 commit c2432ff
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 19 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/gh-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ jobs:
run: |
npm install
cp .env .env.production
echo "VITE_CHAT_AI_WIDGET_KEY=${{ secrets.chat_ai_widget_key }}" >> .env.production && \
echo "VITE_CHAT_AI_WIDGET_DATADOG_CLIENT_TOKEN=${{ secrets.datadog_client_token }}" >> .env.production && \
echo "VITE_CHAT_AI_WIDGET_DATADOG_APP_ID=${{ secrets.datadog_app_id }}" >> .env.production
echo "VITE_CHAT_AI_WIDGET_KEY=${{ secrets.chat_ai_widget_key }}" >> .env.production
npm run build:pages
- name: Deploy 🚀
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/package-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ jobs:
echo "Branch $branch_name does not exist. Make sure to create the branch and create a Jira ticket with pr-comment-bot."
exit 1
fi
- name: Setup jq
if: ${{ github.event.inputs.npm_tag }}
uses: dcarbone/install-jq-action@v2
- name: Update version in package.json if npm_tag is provided
if: ${{ github.event.inputs.npm_tag }}
run: |
npm_version="${{ github.event.inputs.version }}-${{ github.event.inputs.npm_tag }}"
jq --arg npm_version "$npm_version" '.version = $npm_version' package.json > package.json.tmp && mv package.json.tmp package.json
- name: Install and Build
run: |
npm install
Expand Down
31 changes: 15 additions & 16 deletions release-guide.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# Release Steps

## Step 0 - Setup
1. Create a new branch for the release, for example: git checkout -b release/{X.X.X}.
2. Update the version field in package.json. Use the format {version}-rc-0 for Release Candidates (RC), increasing the number as necessary. For the final release, follow the semantic versioning (semver) format.
3. Commit the changes, push them to remote, and create a Pull Request (PR).
4. Comment /bot create ticket on the GitHub PR to automatically generate a release ticket.
5. Obtain approval from your manager for the ticket before proceeding to the next step.
## Step 0 - Setup (manual handling needed)
1. Create a new branch for the release, its format should be: `release/v{X.X.X}`.
2. Update the `version` field in `package.json`.
3. Write a CHANGELOG for this release.
4. Commit the changes, push them to remote, and create a Pull Request.
5. Comment `/bot create ticket` on the GitHub PR to automatically generate a release ticket.
6. Obtain approval from managers for the ticket before proceeding to the next step.

## Step 1 - Publish a new chat-ai-widget package (using automated workflow)
1. Navigate to Actions -> [Publish Workflow](./.github/workflows/package-publish.yml) in the GitHub repository.
2. Change the target branch to the release branch created in Step 0.
3. Fill in the version field with the target version (e.g., 1.3.1), and use rc / alpha / beta for the npm_tag field if needed.
4. Once all the steps in the workflow are successfully completed:
- The build output will be published to npm.
3. Enter the target version (e.g., 1.3.1) in the version field, and specify `rc` / `alpha` / `beta` for the `npm_tag` field if necessary.
<img width="450px" alt="workflow-guide" src="screenshot/workflow-guide.png">
4. Hit "Run workflow" button.

Once all the steps in the workflow are successfully completed:
- The build output will be published to npm. (if `npm_tag` is provided, we stop the workflow from here)
- A commit will be pushed to the release PR created in Step 0. This commit includes:
- Changes to the CHANGELOG and version updates.
- `@sendbird/chat-ai-widget` dependency version updated in `/packages/*`.
- A new tag will be pushed to the origin. <- Please use this tag if you wish to publish the changes.

## Step 2 - Deploy a new script under `packages/*`
1. Monitor the package build status on the [Circle CI dashboard](https://app.circleci.com/pipelines/github/sendbird/chat-ai-widget).
2. If the Circle CI dashboard indicates a successful build, proceed to [gate-k8s](https://github.com/sendbird/gate-k8s) and update the `common.version` value in [this file](https://github.com/sendbird/gate-k8s/blob/main/values/aichatbot/prod.yaml) with the tag created in step 1. [This PR](https://github.com/sendbird/gate-k8s/pull/1396) might be helpful to see how you can create a PR in the gate-k8s repository.
3. Once your PR is merged into the main branch in gate-k8s, the new script will be deployed immediately.
- A new tag(`v{version}`) will be pushed to the origin to trigger the self-service script deployment.
- Check the progress in [Circle CI dashboard](https://app.circleci.com/pipelines/github/sendbird/chat-ai-widget).
Binary file added screenshot/workflow-guide.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c2432ff

Please sign in to comment.