v0.4.0 (#309) #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload Python Packages | |
on: | |
push: | |
tags: ['v*'] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: python -m pip install --upgrade pip && pip install build | |
- name: Build nixtla package | |
run: python -m build | |
- name: Publish nixtla package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Build nixtlats package | |
run: > | |
rm -rf build dist && | |
mv nixtla nixtlats && | |
sed -i 's/name="nixtla"/name="nixtlats"/g' setup.py && | |
find nixtlats -type f -name '*.py' -exec sed -i 's/from nixtla/from nixtlats/g' {} + && | |
echo -e 'import warnings\nwarnings.warn("This package is deprecated, please install nixtla instead.", category=FutureWarning)' >> nixtlats/__init__.py && | |
python -m build | |
- name: Publish nixtlats package | |
uses: pypa/gh-action-pypi-publish@release/v1 |