Skip to content

Commit

Permalink
chore(ci): release workflow allows manual custom version
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqcode committed Apr 15, 2024
1 parent d3d562a commit 4a19316
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- minor
- major
required: true
custom_version:
description: Manual Custom Version (Special Purpose, v*)
type: string
required: false
dry_run:
description: "Dry run?"
type: boolean
Expand Down Expand Up @@ -39,7 +43,12 @@ jobs:
- name: Handle Version Number
run: |
PREV_VERSION="$(git describe --tags --abbrev=0 --match 'v*')"
NEXT_VERSION="v$(semver --increment ${{ inputs.semver }} ${PREV_VERSION})"
if [ -n "${{ inputs.custom_version }}" ]; then
NEXT_VERSION="${{ inputs.custom_version }}"
else
NEXT_VERSION="v$(semver --increment ${{ inputs.semver }} ${PREV_VERSION})"
fi
echo "PREV_VERSION=${PREV_VERSION}" >> $GITHUB_ENV
echo "VERSION=${NEXT_VERSION}" >> $GITHUB_ENV
Expand Down

0 comments on commit 4a19316

Please sign in to comment.