Skip to content

1.2.0

1.2.0 #1

Workflow file for this run

# This workflow will upload a Python Package to Pypi using Twine when a release is created in this Github repo.
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# Note: There is a bug in Github Actions, so do NOT use the “Save Draft” functionality when creating a new release: https://github.community/t/workflow-set-for-on-release-not-triggering-not-showing-up/16286/5
# Remember to always verify tagged releases are actually available on the Pypi website: https://pypi.org/project/autogluon/
name: Publish Package
on:
release:
types: [created]
jobs:
validate-publish-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install tools
run: |
python -m pip install --upgrade pip
pip install hatch twine
- name: Build package
run: |
hatch build
- name: Run package validators
run: |
twine check dist/*
# Test install from wheel
pip install dist/*.whl
python -c "import uni2ts; print(uni2ts.__version__)"
# Test install from sdist
# pip uninstall -y uni2ts
# pip install dist/*.tar.gz
# python -c "import uni2ts; print(uni2ts.__version__)"
- name: Upload to Test PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
run: |
twine upload --verbose dist/*
- name: Verify Test PyPI publication
run: |
sleep 60
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ uni2ts==${GITHUB_REF#refs/tags/v}
python -c "import uni2ts; print(uni2ts.__version__)"
publish-prod:
needs: validate-publish-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install tools
run: |
python -m pip install --upgrade pip
pip install hatch twine
- name: Build package
run: |
hatch build
- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --verbose dist/*
- name: Verify PyPI publication
run: |
sleep 60
pip install uni2ts==${GITHUB_REF#refs/tags/v}
python -c "import uni2ts; print(uni2ts.__version__)"