File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -74,19 +74,18 @@ jobs:
74
74
if : startsWith(github.ref, 'refs/tags/')
75
75
run : |
76
76
poetry install --no-cache --without dev
77
- toml_version=$(poetry version -s)
77
+ toml_version=$(echo "v"$( poetry version -s) )
78
78
if [[ $toml_version != $(echo $GITHUB_REF | cut -d / -f 3) ]]; then
79
- echo "VERSION_MATCH="failure"" >> $GITHUB_ENV
80
- else
81
- echo "VERSION_MATCH="success"" >> $GITHUB_ENV
79
+ echo "TOML version does not match tag."
80
+ exit 1
82
81
fi
83
82
84
83
- name : Build dist
85
- if : ${{ env.VERSION_MATCH == 'success' }}
84
+ if : startsWith(github.ref, 'refs/tags/')
86
85
run : |
87
86
poetry build --no-cache
88
87
89
88
- name : Release PyPI
90
- if : ${{ env.VERSION_MATCH == 'success' }}
89
+ if : startsWith(github.ref, 'refs/tags/')
91
90
uses : pypa/gh-action-pypi-publish@release/v1
92
91
You can’t perform that action at this time.
0 commit comments