Skip to content

Commit

Permalink
ci: Read package version before publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Jun 14, 2024
1 parent 2f64c60 commit cd80a29
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/argilla-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ jobs:
pip install -U build
rm -rf dist && python -m build
- name: Read package info
run: |
PACKAGE_VERSION=$(python -c 'import argilla_v1; print(argilla_v1.__version__)')
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
echo "PACKAGE_NAME=argilla-v1" >> $GITHUB_ENV
echo "$PACKAGE_NAME==$PACKAGE_VERSION"
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -139,6 +132,13 @@ jobs:
with:
name: argilla-v1
path: dist
- name: Read package info
run: |
pip install --no-deps dist/*.whl
PACKAGE_VERSION=$(python -c 'from importlib.metadata import version; print(version("argilla-v1"))')
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
echo "PACKAGE_NAME=argilla-v1" >> $GITHUB_ENV
echo "$PACKAGE_NAME==$PACKAGE_VERSION"
- name: Publish Package to TestPyPI 🥪
uses: pypa/gh-action-pypi-publish@release/v1
continue-on-error: true
Expand Down

0 comments on commit cd80a29

Please sign in to comment.