From 467a49718bfa72f915ec5b56bd9cd1ecbeccd10b Mon Sep 17 00:00:00 2001 From: Max Xu Date: Fri, 5 Jul 2024 15:44:04 +0800 Subject: [PATCH] ci: auto assign author and update release action (#89) ### Modifications - Add auto assign author job - Use `googleapis/release-please-action@v4` since `google-github-actions/release-please-action@v3` is deprecated --- .github/workflows/pr.yaml | 8 ++++++++ .github/workflows/release.yaml | 7 +++---- .release-please-manifest.json | 1 + modules/aws/variables.tf | 2 +- release-please-config.json | 11 +++++++++++ 5 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 84b510d..cf2d86e 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -10,7 +10,15 @@ on: - edited - synchronize +permissions: + pull-requests: write + jobs: + assign-author: + runs-on: ubuntu-latest + steps: + - uses: toshimaru/auto-author-assign@v2.1.1 + title-check: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eb117db..e145163 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,8 +13,7 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: google-github-actions/release-please-action@v3 + - uses: googleapis/release-please-action@v4 with: - release-type: terraform-module - extra-files: | - variables.tf + token: ${{ secrets.SNBOT_GITHUB_TOKEN }} + target-branch: ${{ github.ref_name }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/modules/aws/variables.tf b/modules/aws/variables.tf index bfd02b0..61ae0f6 100644 --- a/modules/aws/variables.tf +++ b/modules/aws/variables.tf @@ -16,7 +16,7 @@ variable "sn_policy_version" { description = "The value of SNVersion tag" - default = "3.14.0" //x-release-please-version + default = "3.14.0" # x-release-please-version type = string } diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..74a136a --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,11 @@ +{ + "release-type": "terraform-module", + "packages": { + ".": { + "release-type": "terraform-module", + "extra-files": [ + "modules/aws/variables.tf" + ] + } + } +} \ No newline at end of file