Skip to content

Commit

Permalink
Merge pull request #53 from smartcontractkit/feat/release-process
Browse files Browse the repository at this point in the history
feat: changesets for release process
  • Loading branch information
patrickhuie19 authored Jan 23, 2024
2 parents 1f37869 + e3a0fdb commit 6c8fab2
Show file tree
Hide file tree
Showing 10 changed files with 2,043 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
16 changes: 16 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "smartcontractkit/wsrpc"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/heavy-hats-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chainlink/wsrpc": patch
---

Update dependencies
5 changes: 5 additions & 0 deletions .changeset/ten-boxes-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chainlink/wsrpc": patch
---

Remove deprecated usages of protogen Annotate method
30 changes: 30 additions & 0 deletions .github/workflows/cd-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CD Release

on:
push:
branches:
- main

jobs:
cd-release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: cd-release
uses: smartcontractkit/.github/actions/cicd-changesets@c5b65fcfe12a5a14b60b03605748af0b0c6cfbea # cicd-changesets@0.2.0
with:
# general inputs
git-user: app-token-issuer-infra-releng[bot]
git-email: app-token-issuer-infra-releng[bot]@users.noreply.github.com
# changesets inputs
changesets-create-gh-release: "true"
# aws inputs
aws-region: ${{ secrets.AWS_REGION }}
aws-role-arn: ${{ secrets.AWS_OIDC_WSRPC_CI_CHANGESET_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.AWS_FOUNDATIONS_GATI_URL }}
# grafana inputs
metrics-job-name: cd-release
gc-basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
gc-host: ${{ secrets.GRAFANA_CLOUD_HOST }}
2 changes: 1 addition & 1 deletion .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
this-job-name: ci-test
continue-on-error: true
continue-on-error: true
2 changes: 1 addition & 1 deletion .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
go-version-file: 'go.mod'
id: go

- name: Write Go Modules list
Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,24 @@ While the client's are connected, kill the server and see the client's enter a b

- [ ] Improve Tests
- [ ] Return a response status
- [x] Add a Blocking DialOption
- [x] Add a Blocking DialOption

## Release Process

The release process for this package is based off [smartcontractkit/releng-go-lib](https://github.com/smartcontractkit/releng-go-lib). This release process leverages [changesets](https://github.com/changesets/changesets).

### Setup

- Install `pnpm` ([pnpm.io/installation](https://pnpm.io/installation))
- Run `pnpm install`

### General usage

During a regular change, include a `changeset` file in the PR by running `pnpm changeset`. It will prompt you for a description of the change, and whether the change is a major/minor/patch version bump.

This will create a file in the `.changeset` directory. When a release is created this file will be "consumed", applying the version bump, and including the change's description to the release's notes.

### Creating a release

When `changeset` files are present on the main branch, there will be a persistent pull request open. This pull request "consumes" the changeset files, and bumps the version in `package.json`.
When this PR is merged, the automated workflow running against `main` will create a tag and release.
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@chainlink/wsrpc",
"version": "0.8.0",
"description": "Bi-directional communication channel using mTLS and web sockets.",
"main": "index.js",
"private": true,
"scripts": {
"ci:changeset:publish": "pnpm changeset publish",
"ci:changeset:version": "pnpm changeset version && pnpm version --patch"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "~2.26.2"
},
"author": "@smartcontractkit",
"license": "MIT",
"repository": "https://github.com/smartcontractkit/wsrpc"
}
Loading

0 comments on commit 6c8fab2

Please sign in to comment.