From 85b37dfc75ca6437284a978f16a842b9707303d5 Mon Sep 17 00:00:00 2001 From: Daniel Morris Date: Mon, 5 Feb 2024 10:14:32 +0000 Subject: [PATCH] feat: Begin automating the release process --- .github/release-please-config.json | 32 ++++++++++++++++++++++++++++ .github/release-please-manifest.json | 1 + .github/workflows/ci.yaml | 21 ++++++++++++++++-- 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 .github/release-please-config.json create mode 100644 .github/release-please-manifest.json diff --git a/.github/release-please-config.json b/.github/release-please-config.json new file mode 100644 index 0000000..ff5d64c --- /dev/null +++ b/.github/release-please-config.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "changelog-sections": [ + { + "hidden": false, + "section": "New features", + "type": "feat" + }, + { + "hidden": false, + "section": "Bug fixes", + "type": "fix" + }, + { + "hidden": false, + "section": "Miscellaneous", + "type": "chore" + } + ], + "draft": false, + "extra-label": "automata ๐Ÿค–,autorelease: pending,chore ๐Ÿงน", + "include-v-in-tag": true, + "initial-version": "1.8.0", + "prerelease": false, + "pull-request-header": "๐Ÿค– I have created a release", + "pull-request-title-pattern": "chore: Release v${version}", + "release-type": "terraform-module" + } + } +} diff --git a/.github/release-please-manifest.json b/.github/release-please-manifest.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.github/release-please-manifest.json @@ -0,0 +1 @@ +{} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 33d129d..8dad209 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,6 +7,7 @@ on: paths-ignore: - .editorconfig - .gitignore + - CHANGELOG.md - LICENSE.md - README.md push: @@ -15,6 +16,7 @@ on: paths-ignore: - .editorconfig - .gitignore + - CHANGELOG.md - LICENSE.md - README.md @@ -26,7 +28,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - name: Setup Terraform - uses: hashicorp/setup-terraform@v2 + uses: hashicorp/setup-terraform@v3 with: terraform_version: ${{ matrix.terraform_version }} - name: Initialise with no backend @@ -48,8 +50,23 @@ jobs: runs-on: ubuntu-latest steps: - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v4 with: aws-region: ${{ secrets.AWS_REGION }} role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github - run: aws sts get-caller-identity + + release: + name: Release? + needs: [ caller-identity ] + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Prepare a release + uses: google-github-actions/release-please-action@v4 + with: + config-file: .github/release-please-config.json + manifest-file: .github/release-please-manifest.json + token: ${{ secrets.GITHUB_TOKEN }}