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
37 changes: 19 additions & 18 deletions .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ jobs:
id: cache-solana-programs
with:
path: ./e2e/artifacts/solana
key: "${{ runner.os }}-mcms-contracts-${{ steps.solana-programs-cache-key.outputs.key }}"
key: "${{
runner.os}}-mcms-contracts-${{steps.solana-programs-cache-key.outputs.key }}"
Comment on lines +109 to +110

- name: Build Solana programs
if: steps.cache-solana-programs.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -149,27 +150,27 @@ jobs:
exit 0
}

cd-release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: cd-release
uses: smartcontractkit/.github/actions/cicd-changesets@01d931b0455a754d12e7143cc54a5a3521a8f6f6 # cicd-changesets@0.3.6
with:
# general inputs
git-user: app-token-issuer-infra-releng[bot]
git-email: app-token-issuer-infra-releng[bot]@users.noreply.github.com
# aws inputs
aws-region: ${{ secrets.AWS_REGION }}
aws-role-arn: ${{ secrets.AWS_OIDC_MCMS_CI_CHANGESET_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.GATI_LAMBDA_DEPLOYMENT_AUTOMATION_URL }}
# cd-release:
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just leaving these commented out for now while we test the new release process

# runs-on: ubuntu-latest
# permissions:
# id-token: write
# contents: read
# steps:
# - name: cd-release
# uses: smartcontractkit/.github/actions/cicd-changesets@01d931b0455a754d12e7143cc54a5a3521a8f6f6 # cicd-changesets@0.3.6
Comment on lines +153 to +160
# with:
# # general inputs
# git-user: app-token-issuer-infra-releng[bot]
# git-email: app-token-issuer-infra-releng[bot]@users.noreply.github.com
# # aws inputs
# aws-region: ${{ secrets.AWS_REGION }}
# aws-role-arn: ${{ secrets.AWS_OIDC_MCMS_CI_CHANGESET_TOKEN_ISSUER_ROLE_ARN }}
# aws-lambda-url: ${{ secrets.GATI_LAMBDA_DEPLOYMENT_AUTOMATION_URL }}

ci-sonarqube:
name: Sonarqube Scan
runs-on: ubuntu-latest
needs: [ci-lint, ci-lint-misc, ci-test]
needs: [ ci-lint, ci-lint-misc, ci-test ]
permissions:
contents: read
actions: read
Expand Down
83 changes: 41 additions & 42 deletions .github/workflows/push-tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,48 +43,47 @@ jobs:
steps:
- name: ci-test
uses: smartcontractkit/.github/actions/ci-test-go@2b1d964024bb001ae9fba4f840019ac86ad1d824 # ci-test-go@1.1.0
# cicd-publish-release:
# runs-on: ubuntu-latest
# permissions:
# id-token: write
# contents: write
# actions: read
# steps:
# - name: cicd-publish-release
# uses: smartcontractkit/.github/actions/cicd-build-publish-artifacts-go@b4737861584f88fa9569d6978f70fedf8b1ae67c # cicd-build-publish-artifacts-go@0.4.0
# with:
Comment on lines +46 to +55
# # general inputs
# app-name: mcms-lib
# publish: "false" # do not publish docker image to ECR
# update-git-tag: "true"
# # goreleaser inputs
# goreleaser-args: "--config .goreleaser.yml"
# goreleaser-version: "~> v2"
# goreleaser-dist: goreleaser-pro
# goreleaser-key: ${{ secrets.GORELEASER_KEY }}

cicd-publish-release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
actions: read
steps:
- name: cicd-publish-release
uses: smartcontractkit/.github/actions/cicd-build-publish-artifacts-go@b4737861584f88fa9569d6978f70fedf8b1ae67c # cicd-build-publish-artifacts-go@0.4.0
with:
# general inputs
app-name: mcms-lib
publish: "false" # do not publish docker image to ECR
update-git-tag: "true"
# goreleaser inputs
goreleaser-args: "--config .goreleaser.yml"
goreleaser-version: "~> v2"
goreleaser-dist: goreleaser-pro
goreleaser-key: ${{ secrets.GORELEASER_KEY }}
# notify-slack:
# if: ${{ success() }}
# needs:
# - cicd-publish-release
# runs-on: ubuntu-latest
# permissions:
# contents: read
# environment: build-publish
# steps:
# - name: Checkout repository
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

notify-slack:
if: ${{ success() }}
needs:
- cicd-publish-release
runs-on: ubuntu-latest
permissions:
contents: read
environment: build-publish
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set tag for Slack notification
run: echo "TAG=${{ github.ref_name }}" >> "$GITHUB_ENV"
shell: bash
# - name: Set tag for Slack notification
# run: echo "TAG=${{ github.ref_name }}" >> "$GITHUB_ENV"
# shell: bash

- name: Notify Slack
uses: smartcontractkit/.github/actions/slack-notify-git-ref@01d931b0455a754d12e7143cc54a5a3521a8f6f6 # slack-notify-git-ref@0.1.4
with:
slack-channel-id: ${{ secrets.SLACK_CHANNEL_MCMS }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN_RELENG }} # Releng Bot
git-ref: ${{ env.TAG }}
git-ref-type: tag
changelog-url: "https://github.com/${{ github.repository }}/releases/tag/${{ env.TAG }}"
# - name: Notify Slack
# uses: smartcontractkit/.github/actions/slack-notify-git-ref@01d931b0455a754d12e7143cc54a5a3521a8f6f6 # slack-notify-git-ref@0.1.4
# with:
# slack-channel-id: ${{ secrets.SLACK_CHANNEL_MCMS }}
# slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN_RELENG }} # Releng Bot
# git-ref: ${{ env.TAG }}
# git-ref-type: tag
# changelog-url: "https://github.com/${{ github.repository }}/releases/tag/${{ env.TAG }}"
31 changes: 31 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: release-please

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write
id-token: write

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest
steps:
- name: Issue GitHub Token
id: issue-github-token
uses: smartcontractkit/.github/actions/setup-github-token@setup-github-token/v1
with:
aws-role-arn: ${{ secrets.AWS_OIDC_MCMS_CI_CHANGESET_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.GATI_LAMBDA_DEPLOYMENT_AUTOMATION_URL }}
aws-region: ${{ secrets.AWS_REGION }}

- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
with:
token: ${{ steps.issue-github-token.outputs.access-token }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.43.0"
}
18 changes: 3 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
- [Team Overview](#team-overview)
- [How to Contribute](#how-to-contribute)
- [Conventional Commits](#conventional-commits)
- [Changesets](#changesets)

<!-- TOC -->

Expand All @@ -18,10 +17,10 @@ The Operations Platform Tooling ([@smartcontractkit/op-tooling](https://github.c

1. Open a branch from `main` and give it a descriptive name.
2. Make changes on your branch.
3. When you are ready to submit your changes, [create a changeset](#changesets) with `pnpm changeset` and commit the changeset file.
4. Push your branch and open a PR against `main`. You must follow the [Conventional Commits](#conventional-commits) format for the PR title.
3. Push your branch and open a PR against `main`.
4. Give the PR a Conventional Commit title. This title is used by Release Please to decide the next version and changelog entry when the PR is merged.
5. Ensure your PR passes all CI checks.
6. Request a review from the OP Tooling team ([@smartcontractkit/op-tooling](https://github.com/orgs/smartcontractkit/teams/op-tooling)).
6. Request a review from the Operations Platform team ([@smartcontractkit/operations-platform](https://github.com/orgs/smartcontractkit/teams/operations-platform)).

## Conventional Commits

Expand All @@ -43,14 +42,3 @@ Use `!` after the type, or include `BREAKING CHANGE:` in the commit body, when t

For details on how Release Please uses Conventional Commits and semantic versioning, see [RELEASE.md](./RELEASE.md).

## Changesets

Changesets are a way to manage changes to the codebase that are not yet released. Here are a few things to keep in mind when you create a changeset:

- Following semantic versioning, select between: major, minor and patch
- **MAJOR** version when you make incompatible API changes
- **MINOR** version when you add functionality in a backwards compatible manner
- **PATCH** version when you make backwards compatible bug fixes.
- When describing the change, try to answer the following:
- **WHAT** the change is
- **WHY** the change was made
46 changes: 38 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,47 @@
<!-- TOC -->

- [Release Process](#release-process)
- [Preparing a Release](#preparing-a-release)
- [How to Release](#how-to-release)
- [Release Please](#release-please)
- [Semantic Versioning](#semantic-versioning)
- [Preparing a Release](#preparing-a-release)
- [How to Release](#how-to-release)

<!-- TOC -->

### Preparing a Release
## Release Please

After every PR with a changeset is merged, a changesets CI job will create or update a "Version Packages" PR, which contains the release version and information about the changes.
This repo uses [Release Please](https://github.com/googleapis/release-please) to manage releases. Do not run `pnpm changeset` or add changeset files for releases.

### How to Release
Release Please determines the next release from Conventional Commit messages on `main`. Because PR titles are linted, use a Conventional Commit title that describes the user-visible impact of the change:

1. Approve or request approval to merge the "Version Packages" PR.
2. Merge the "Version Packages" PR.
3. This will trigger the release workflow, automatically releasing a new version and pushing a tag for the version. Check the [release view](https://github.com/smartcontractkit/mcms/releases) to confirm the latest release.
- `feat: add support for new deployment workflow` for backwards-compatible features
- `fix: handle missing workflow artifacts` for backwards-compatible bug fixes
- `perf: reduce datastore lookup latency` for performance improvements
- `feat!: remove deprecated workflow input` or a commit body with `BREAKING CHANGE:` for incompatible API changes

Other types such as `docs`, `test`, `ci`, `chore`, `build`, `style`, and `refactor` are allowed, but they are hidden from the changelog by the current Release Please configuration and usually do not create a release by themselves.

When writing the PR title and description, make it clear:

- **WHAT** the change is
- **WHY** the change was made
- Whether the change is breaking or requires downstream action

## Semantic Versioning

Release Please follows semantic versioning when choosing the next version:

- **MAJOR** version when you make incompatible API changes
- **MINOR** version when you add functionality in a backwards-compatible manner
- **PATCH** version when you make backwards-compatible bug fixes

## Preparing a Release

The `release-please` workflow runs after changes are merged to `main`. When Release Please finds releasable changes, it opens or updates a release PR that includes the version bump, changelog updates, and `.release-please-manifest.json` changes.

## How to Release

1. Review the Release Please PR and confirm the changelog and version are correct.
2. Approve or request approval to merge the Release Please PR.
3. Merge the Release Please PR into `main`.
4. The `release-please` workflow will create the GitHub release and push the version tag automatically.
23 changes: 23 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"packages": {
".": {
"release-type": "go",
"package-name": "mcms",
"include-component-in-tag": false,
"bump-minor-pre-major": true
}
},
"changelog-sections": [
{ "type": "build", "section": "Builds", "hidden": true },
{ "type": "chore", "section": "Miscellaneous", "hidden": true },
{ "type": "ci", "section": "Continuous Integrations", "hidden": true },
{ "type": "docs", "section": "Documentation", "hidden": true },
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "perf", "section": "Performance Improvements", "bump": "patch" },
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
{ "type": "revert", "section": "Reverts", "bump": "patch" },
{ "type": "style", "section": "Styles", "hidden": true },
{ "type": "test", "section": "Tests", "hidden": true }
]
}
Loading