Skip to content

Commit

Permalink
Update action tests
Browse files Browse the repository at this point in the history
  • Loading branch information
choffmeister committed Dec 9, 2023
1 parent d2b6ec0 commit abf84d8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,26 @@ jobs:
echo Output version is empty!
exit 1
fi
test-action-0-4-0:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: git-describe-semver
uses: choffmeister/git-describe-semver@main
with:
version: 0.4.0
dir: .
fallback: v0.0.0-init
drop-prefix: true
prerelease-prefix: prefix
prerelease-suffix: suffix
prerelease-timestamped: true
next-release: major
- name: Verify output
run: |
if [[ -z "${{ steps.git-describe-semver.outputs.version }}" ]]; then
echo Output version is empty!
exit 1
fi
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ runs:
git-describe-semver \
${{ format('--dir="{0}"', inputs.dir) }} \
${{ format('--fallback="{0}"', inputs.fallback) }} \
${{ format('--drop-prefix="{0}"', inputs.drop-prefix) }} \
${{ inputs.drop-prefix == 'true' && format('--drop-prefix') || '' }} \
${{ format('--prerelease-prefix="{0}"', inputs.prerelease-prefix) }} \
${{ format('--prerelease-suffix="{0}"', inputs.prerelease-suffix) }} \
${{ format('--prerelease-timestamped="{0}"', inputs.prerelease-timestamped) }} \
Expand Down

0 comments on commit abf84d8

Please sign in to comment.