Skip to content

Commit

Permalink
ci(release): automate the release-process by using the release-please…
Browse files Browse the repository at this point in the history
… bot (#79)
  • Loading branch information
RothAndrew authored Aug 1, 2023
1 parent c051647 commit 8f2ab12
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: release-please

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
command: manifest
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.10.0"
}
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributor Guide

## Commit Messages

Because we use the [release-please](https://github.com/googleapis/release-please) bot, commit messages to main must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. This is enforced by the [commitlint](https://commitlint.js.org/#/) tool. This requirement is only enforced on the `main` branch. Commit messages in PRs can be whatever you want them to be. "Squash" mode must be used when merging a PR, with a commit message that follows the Conventional Commits specification.

## Release Process

This repo uses the [release-please](https://github.com/googleapis/release-please) bot. Release-please will automatically open a PR to update the version of the repo when a commit is merged to `main` that follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. The bot will automatically keep the PR up to date until a human merges it. When that happens the bot will automatically create a new release.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Build Harness is a Docker image, loaded with an array of tools, built to transfo

## Getting Started

### Using Build Harness

Getting started with Build Harness is as easy as running `docker run`. Here's an example from the perspective of how somebody might use it in a setting where a Golang application is being developed.

```
Expand All @@ -25,6 +27,10 @@ Doing so would allow running the same command (`make test`) in your local enviro

To get a better idea of what it looks like to use Build Harness operationally, take a look at [this repo](https://github.com/defenseunicorns/terraform-aws-uds-vpc) where it is used. This pattern uses a Makefile to wrap actions that utilize Build Harness to run `make test` or `make pre-commit-all`.

### Contributing to Build Harness

See [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to contribute to Build Harness.

## Why Repeatable Environments?

In an increasingly complex and distributed development landscape, the ability to have consistent and repeatable build and test environments has become a non-negotiable requirement. A common baseline ensures code behaves the same way across all settings, eliminating the infamous "it works on my machine" scenarios. Having a consistent environment reduces the time spent troubleshooting environment-specific issues and allows teams to focus on what really matters - building great software.
Expand Down
39 changes: 39 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"packages": {
".": {
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"changelog-host": "https://github.com",
"changelog-path": "CHANGELOG.md",
"changelog-sections": [
{ "type": "feat", "section": "Features" },
{ "type": "feature", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "perf", "section": "Performance Improvements" },
{ "type": "revert", "section": "Reverts" },
{ "type": "docs", "section": "Documentation" },
{ "type": "style", "section": "Styles" },
{ "type": "chore", "section": "Miscellaneous Chores" },
{ "type": "refactor", "section": "Code Refactoring" },
{ "type": "test", "section": "Tests" },
{ "type": "build", "section": "Build System" },
{ "type": "ci", "section": "Continuous Integration" }
],
"changelog-type": "default",
"draft": false,
"draft-pull-request": false,
"exclude-paths": [],
"extra-files": [],
"extra-label": "",
"include-component-in-tag": false,
"include-v-in-tag": false,
"prerelease": false,
"pull-request-header": ":robot: I have created a release *beep* *boop*",
"pull-request-title-pattern": "chore${scope}: release ${component} ${version}",
"release-type": "simple",
"separate-pull-requests": false,
"skip-github-release": false,
"versioning": "default"
}
}
}

0 comments on commit 8f2ab12

Please sign in to comment.