Avoid SemVer validation error with tags like v1

This commit is contained in:
mtkennerly 2022-10-31 14:10:01 +08:00
parent 0476fd5931
commit 3aeac53b8e
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408

View file

@ -5,23 +5,7 @@ on:
name: Main name: Main
jobs: jobs:
example: test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- uses: actions/checkout@v2
with:
# This is necessary so that we have the tags.
fetch-depth: 0
- uses: ./
with:
env-var: MY_VERSION
args: --style semver
- run: echo $MY_VERSION
complete:
strategy: strategy:
matrix: matrix:
os: os:
@ -35,6 +19,7 @@ jobs:
python-version: '3.7' python-version: '3.7'
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
# This is necessary so that we have the tags.
fetch-depth: 0 fetch-depth: 0
- uses: ./ - uses: ./
id: dunamai id: dunamai
@ -42,7 +27,7 @@ jobs:
install: '1.13.2' install: '1.13.2'
env-var: MY_VERSION env-var: MY_VERSION
command: dunamai from git command: dunamai from git
args: --style semver args: --style pep440
- if: matrix.os != 'windows-latest' - if: matrix.os != 'windows-latest'
run: echo $MY_VERSION from environment variable run: echo $MY_VERSION from environment variable
- if: matrix.os == 'windows-latest' - if: matrix.os == 'windows-latest'