Skip to content

Commit 54f72cb

Browse files
authored
replacing the version in the toml with the tag (#142)
as part of the release drafter process
1 parent 3e5c2e7 commit 54f72cb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/publish-pypi.yml

+15
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ jobs:
1111
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
1212
steps:
1313
- uses: actions/checkout@master
14+
15+
- name: get version from tag
16+
id: get_version
17+
run: |
18+
realversion="${GITHUB_REF/refs\/tags\//}"
19+
realversion="${realversion//v/}"
20+
echo "::set-output name=VERSION::$realversion"
21+
22+
- name: Set the version for publishing
23+
uses: ciiiii/[email protected]
24+
with:
25+
file: "pyproject.toml"
26+
key: "tool.poetry.version"
27+
value: "${{ steps.get_version.outputs.VERSION }}"
28+
1429
- name: Set up Python 3.7
1530
uses: actions/setup-python@v1
1631
with:

0 commit comments

Comments
 (0)