Skip to content

Commit

Permalink
ci(release-please): Add monorepo config
Browse files Browse the repository at this point in the history
This will allow us to release each of our actions and reusable workflows
individually, which will allow us to evolve them without worrying about
breaking users. Doing it separately will avoid users being asked to
upgrade unnecessarily.
  • Loading branch information
iainlane committed Sep 25, 2024
1 parent b7ca1eb commit 6dfc573
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- iainlane/release-please-test

jobs:
release-please:
Expand All @@ -12,13 +13,23 @@ jobs:
- uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
id: release
with:
release-type: simple
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
target-branch: ${{ github.ref_name }}

- name: Pretty print outputs of release step
env:
OUTPUTS: ${{ toJson(steps.release.outputs) }}
run: |
jq . <<< '${{ env.OUTPUTS }}'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# this step is needed since we are publishing github actions releases.
# when patching a version e.g. v2.0.0 to v2.0.1,
# we need to make sure that v2 is updated as well as v2.0
- name: tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
if: false
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
Expand Down
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
104 changes: 104 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"changelog-sections": [
{
"section": "🎉 Features",
"type": "feat"
},
{
"section": "🐛 Bug Fixes",
"type": "fix"
},
{
"section": "⚡ Performance Improvements",
"type": "perf"
},
{
"section": "🔗 Dependencies",
"type": "deps"
},
{
"section": "📝 Documentation",
"type": "docs"
},
{
"section": "🏗️ Build System",
"type": "build"
},
{
"section": "🤖 Continuous Integration",
"type": "ci"
},
{
"section": "🔧 Miscellaneous Chores",
"type": "chore"
},
{
"section": "⏪ Reverts",
"type": "revert"
},
{
"section": "✅ Tests",
"type": "test"
},
{
"section": "💄 Style",
"type": "style"
},
{
"section": "♻️ Code Refactoring",
"type": "refactor"
}
],
"draft-pull-request": true,
"include-v-in-tag": true,
"packages": {
"actions/argo-lint": {
"package-name": "argo-lint"
},
"actions/aws-auth": {
"package-name": "aws-auth"
},
"actions/build-push-to-dockerhub": {
"package-name": "build-push-to-dockerhub"
},
"actions/dockerhub-login": {
"package-name": "dockerhub-login"
},
"actions/find-pr-for-commit": {
"package-name": "find-pr-for-commit"
},
"actions/generate-openapi-clients": {
"package-name": "generate-openapi-clients"
},
"actions/get-vault-secrets": {
"package-name": "get-vault-secrets"
},
"actions/lint-pr-title": {
"package-name": "lint-pr-title"
},
"actions/login-to-gar": {
"package-name": "login-to-gar"
},
"actions/login-to-gcs": {
"package-name": "login-to-gcs"
},
"actions/push-to-gar-docker": {
"package-name": "push-to-gar-docker"
},
"actions/push-to-gcs": {
"package-name": "push-to-gcs"
},
"actions/send-slack-message": {
"package-name": "send-slack-message"
},
"actions/setup-argo": {
"package-name": "setup-argo"
},
"actions/setup-conftest": {
"package-name": "setup-conftest"
}
},
"release-type": "simple",
"separate-pull-requests": true
}

0 comments on commit 6dfc573

Please sign in to comment.