From 8e7f28f8daacf99c5dd7cab79281e1d433341349 Mon Sep 17 00:00:00 2001 From: Ugo Mignon Date: Thu, 11 Apr 2024 23:13:29 +0200 Subject: [PATCH] ci(release): auto release --- .../workflows/conventional-commits-check.yaml | 15 ++++++++++++++ .github/workflows/lint.yaml | 16 +++++++-------- .github/workflows/push.yaml | 9 ++++----- .github/workflows/release.yaml | 20 +++++++++++++++++++ release-please-config.json | 17 ++++++++++++++++ 5 files changed, 64 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/conventional-commits-check.yaml create mode 100644 .github/workflows/release.yaml create mode 100644 release-please-config.json diff --git a/.github/workflows/conventional-commits-check.yaml b/.github/workflows/conventional-commits-check.yaml new file mode 100644 index 000000000..5c28e5111 --- /dev/null +++ b/.github/workflows/conventional-commits-check.yaml @@ -0,0 +1,15 @@ +name: Conventional Commits Check + +on: + pull_request: + branches: [ develop ] + +jobs: + check-conventional-commits: + name: Conventional Commits + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Check Commit Conventions + uses: webiny/action-conventional-commits@v1.3.0 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index caaef7a84..e927f5bef 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -30,11 +30,11 @@ jobs: --target-branch=develop \ --chart-dirs=. \ --chart-repos=bitnami=https://charts.bitnami.com/bitnami,bitnami-old=https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami,sentry-kubernetes=https://sentry-kubernetes.github.io/charts - # It would be nice to turn on this testing, but it is hard to get right and - # rather complex (as well as expensive in terms of runner compute time). - # Additionally, this is out of scope of fixing the issue brought up in #456 - # - name: Create kind cluster - # uses: helm/kind-action@v1.2.0 - # if: steps.list-changed.outputs.changed == 'true' - # - name: Run chart-testing (install) - # run: ct install --target-branch=develop --chart-dirs=. + # It would be nice to turn on this testing, but it is hard to get right and + # rather complex (as well as expensive in terms of runner compute time). + # Additionally, this is out of scope of fixing the issue brought up in #456 + # - name: Create kind cluster + # uses: helm/kind-action@v1.2.0 + # if: steps.list-changed.outputs.changed == 'true' + # - name: Run chart-testing (install) + # run: ct install --target-branch=develop --chart-dirs=. diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index f8f6a61d1..a3985cd45 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -2,19 +2,19 @@ name: Build and push Chart on: push: - branches: - - develop + tags: + - '*' jobs: build-push: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: 'main' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: 'gh-pages' @@ -35,7 +35,6 @@ jobs: with: command: package main/sentry --destination gh-pages/charts - - name: Build zips uses: yeouchien/helm3-action@f3a7c239c5c60777210c8e631839edf5dd3fa29c with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 000000000..919410c53 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,20 @@ +name: Release Please + +on: + push: + branches: + - develop + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - name: Release Please Action + uses: google-github-actions/release-please-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + config-file: release-please-config.json diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 000000000..2e3027c5a --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + "clickhouse": { + "release-type": "helm", + "changelog-path": "CHANGELOG.md" + }, + "sentry": { + "release-type": "helm", + "changelog-path": "CHANGELOG.md" + }, + "sentry-kubernetes": { + "release-type": "helm", + "changelog-path": "CHANGELOG.md" + } + } +}