Merge pull request #112 from GeoOcean/new-tests-and-docs #39
Workflow file for this run
This file contains hidden or 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: Build and Publish Package | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build-and-publish-package: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set Up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Dependencies | |
| run: | | |
| pip install build setuptools-scm twine | |
| conda install -c conda-forge conda-build anaconda-client | |
| - name: Get Version | |
| id: get_version | |
| run: | | |
| echo "version=$(python -c 'import setuptools_scm; print(setuptools_scm.get_version())')" >> $GITHUB_ENV | |
| env: | |
| GITHUB_ENV: ${{ github.env }} | |
| - name: Build Python Package | |
| run: python -m build | |
| - name: Publish to PyPI | |
| run: python -m twine upload dist/* --verbose | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |