Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Updated release job to the latest. #4

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading