Skip to content

upload v4 (#635)

upload v4 (#635) #95

Workflow file for this run

name: Publish
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: Clone ETA
uses: actions/checkout@v2
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: 3
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel twine
- name: Install ETA
run: |
pip install --no-deps -e .
- name: Validate version
run: |
SETUP_VERSION="$(pip list --format json | jq -r '.[] | select(.name=="voxel51-eta") | .version')"
TAG_VERSION="$(echo "${{ github.ref }}" | sed 's/^refs\/tags\/v//' | sed 's/-rc\..*//')"
echo "setup.py version: ${SETUP_VERSION}"
echo "tagged version: ${TAG_VERSION}"
test "${SETUP_VERSION}" = "${TAG_VERSION}"
- name: Build wheel
run: |
RELEASE_VERSION=$(echo "${{ github.ref }}" | sed 's/^refs\/tags\/v//') python setup.py sdist bdist_wheel
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/
- name: Set environment
env:
RELEASE_TAG: ${{ github.ref }}
run: |
echo "TWINE_PASSWORD=${{ secrets.FIFTYONE_PYPI_TOKEN }}" >> $GITHUB_ENV
echo "TWINE_REPOSITORY=pypi" >> $GITHUB_ENV
- name: Publish wheel
env:
TWINE_USERNAME: __token__
TWINE_NON_INTERACTIVE: 1
run: twine upload dist/*