Skip to content

chore: use version from tag for release #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Nov 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ jobs:
TAG_NO_PREFIX=$(echo "$TAG" | sed 's/^refs\/tags\///')
# Extract the path of the module to publish from the tag
PACKAGE_PATH=$(echo "$TAG_NO_PREFIX" | rev | cut -d'/' -f2- | rev)
# Save the path to the module for use in the build/publish step to only update the module associated with this tag
# Extract version to publish from tag
VERSION="${TAG_NO_PREFIX##*/}"
echo $VERSION
# Save the path to the module and the version for use in the build/publish step to only update the module associated with this tag
echo "PACKAGE_PATH=$PACKAGE_PATH" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build & Publish to PyPi
run: |
pip install poetry
cd $PACKAGE_PATH
cd $PACKAGE_PATH
# replace version
sed -i "s/^version =.*/version = \"${VERSION}\"/" pyproject.toml
poetry publish --build --username="__token__" --no-interaction --password="${{ secrets.PYPI_TOKEN }}"
Loading