Skip to content

Commit

Permalink
bump: version 0.1.0 → 0.1.1 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesiarmes committed Oct 10, 2024
1 parent e9e6bc4 commit db108b8
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/release-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,23 @@ jobs:
id: version
uses: actions/github-script@v7
with:
# Look for the last version number, expecting it to be in the format:
# `#.#.#-<suffix>.#` where the suffix is optional.
script: |
const message = 'bump: version 0.1.0 → 0.1.1 (#1)'
const regex = /^bump:.+(?<version>\d+\.\d+\.\d+[\da-z.-]*) \(#\d+\)$/
const version = message.match(regex).groups.version
console.log(version)
return version
# - name: Determine the new version number
# id: version
# shell: bash
# # Look for the last version number, expecting it to be in the format:
# # `#.#.#-<suffix>.#` where the suffix is optional.
# run: |
# MESSAGE='${{ github.event.head_commit.message }}'
# echo $MESSAGE
# [[ $MESSAGE =~ ^bump:.+([0-9]+\.[0-9+]\.[0-9]+[a-z0-9.\-]*)[[:space:]]\\(#[0-9]+\\) ]]
# echo $BASH_REMATCH
# echo "version=${BASH_REMATCH[2]}" >> $GITHUB_OUTPUT
- name: Output the new version number
run: echo '${{ steps.version.outputs.result }}'
- name: Bump version and create changelog
id: bump
uses: commitizen-tools/commitizen-action@master
with:
push: false
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog_increment_filename: release.md
git_redirect_stderr: true
- name: Output the new version number
run: echo '${{ steps.bump.outputs.version }}'

0 comments on commit db108b8

Please sign in to comment.