From 9fca51f5eab79819a2ce207cf24c8380f7c0fa0e Mon Sep 17 00:00:00 2001 From: James Armes Date: Fri, 11 Oct 2024 16:26:05 -0400 Subject: [PATCH] ci: Updated release job to the latest. --- .github/workflows/release.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5745fca..5dd5f63 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -51,16 +51,18 @@ jobs: - name: Get the version from the commit message id: version uses: actions/github-script@v7 + env: + COMMIT_MESSAGE: ${{ github.event.head_commit.message }} with: result-encoding: string # Look for the last version number, expecting it to be in the format: # `#.#.#-.#` where the suffix is optional. script: | - const message = '${{ github.event.head_commit.message }}' - const regex = /^bump:.+(?\d+\.\d+\.\d+[\da-z.-]*) \(#\d+\)$/m - const version = message.match(regex).groups.version - console.log(version) - return version + const message = process.env.COMMIT_MESSAGE; + const regex = /^bump:.+(?\d+\.\d+\.\d+[\da-z.-]*) \(#\d+\)$/m; + const version = message.match(regex).groups.version; + console.log(version); + return version; - name: Bundle the module # We create an empty file first, so that tar doesn't complain about the # contents changing while it's running. @@ -72,6 +74,7 @@ jobs: --exclude='.github' \ --exclude='.cz.yaml' \ --exclude='*.tar.gz' \ + --exclude='*.tfvars' \ --exclude='release.md' \ --exclude='CODEOWNERS' \ --exclude='trivy.yaml' \