Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "smartcontractkit/cre-cli" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"privatePackages": {
"version": true,
"tag": true
}
}
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: release
uses: smartcontractkit/.github/actions/cicd-changesets@82c8124faff1a1ce572b957ed63f612129b16a40 # 1.1.2
with:
git-user: app-token-issuer-payments[bot]
git-email: app-token-issuer-payments[bot]@users.noreply.github.com
aws-region: ${{ secrets.AWS_REGION }}
aws-role-arn: ${{ secrets.AWS_OIDC_CRE_CLI_CI_RELEASE_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.AWS_DEV_SERVICES_TOKEN_ISSUER_LAMBDA_URL }}
changesets-create-gh-release: "false"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

# Dependency directories (remove the comment below to include it)
# vendor/
node_modules/

# Build outputs
bin
Expand Down
47 changes: 27 additions & 20 deletions RELEASE_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# How to create a new release
Let's assume we want to create a release for version `v0.1.0`.

Steps:
1. Create a new branch from `main` with the name `releases/v0.1.x`
2. Create a tag on the release branch `git tag -a v0.1.0 -m "Release v0.1.0" -s`
3. Push the tag to the remote `git push origin v0.1.0`
4. Wait for `build-and-release` pipeline to run.
- Once pipeline is successful, the release will be created as a Draft
- Verify all is good and publish release as needed (set as latest if that is the case)

# How to fix a bug in an existing release
Let's assume we want to fix a bug in the release `v0.1.0`.

Steps:
1. Create a new branch from `releases/v0.1.x`.
2. Fix the bug.
3. Create a PR against the branch `releases/v0.1.x`.
4. Go through the review process and merge the PR.
5. Create a release with a tag `v0.1.1` from the branch `releases/v0.1.x`.
# Release Process

This project uses [Changesets](https://github.com/changesets/changesets) for versioning and release management.

## Adding a changeset

When your PR includes changes that warrant a version bump, run:

```bash
pnpm changeset
```

Select the bump type (major, minor, or patch) and provide a summary. This creates a `.changeset/*.md` file that should be committed with your PR.

## How releases happen

1. PRs with changeset files are merged to `main`.
2. The `release.yml` workflow detects pending changesets and opens (or updates) a **"Version Packages"** PR. This PR bumps `package.json`, updates `CHANGELOG.md`, and consumes the changeset files.
3. When the Version Packages PR is merged, the workflow creates a `v*` tag.
4. The tag triggers `build-and-release.yml`, which builds and signs binaries across all platforms and creates a draft GitHub Release.
5. Review the draft release and publish it.

## Hotfixing an existing release

1. Create a branch from the relevant release tag (e.g. `git checkout -b hotfix/v1.3.1 v1.3.0`).
2. Fix the bug and add a changeset (`pnpm changeset` -- typically a `patch`).
3. Follow the standard PR and merge process against `main`.
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "cre-cli",
"private": true,
"version": "1.3.0",
"scripts": {
"ci:changeset:publish": "sh ./scripts/tag-and-push.sh",
"ci:changeset:version": "pnpm changeset version"
},
"devDependencies": {
"@changesets/changelog-github": "0.5.1",
"@changesets/cli": "2.29.7"
}
}
Loading
Loading