diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..984e4ae --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,32 @@ +name: Release Python Package + +on: + workflow_dispatch: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install + run: conda create --quiet --name scif twine + + - name: Install dependencies + run: | + export PATH="/usr/share/miniconda/bin:$PATH" + source activate scif + pip install -e . + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USER }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASS }} + run: | + export PATH="/usr/share/miniconda/bin:$PATH" + source activate scif + python setup.py sdist bdist_wheel + twine upload dist/*