Skip to content

Commit

Permalink
ci: Updated release job to the latest. (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesiarmes authored Oct 11, 2024
1 parent f563864 commit ea1c396
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
# `#.#.#-<suffix>.#` where the suffix is optional.
script: |
const message = '${{ github.event.head_commit.message }}'
const regex = /^bump:.+(?<version>\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:.+(?<version>\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.
Expand All @@ -72,6 +74,7 @@ jobs:
--exclude='.github' \
--exclude='.cz.yaml' \
--exclude='*.tar.gz' \
--exclude='*.tfvars' \
--exclude='release.md' \
--exclude='CODEOWNERS' \
--exclude='trivy.yaml' \
Expand Down

0 comments on commit ea1c396

Please sign in to comment.