Repository navigation
v2.8.0 #19
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
| # This workflow uploads PyLops on PyPI when a release is created | |
| # For more information see: https://github.com/python-attrs/attrs/blob/main/.github/workflows/pypi-package.yml | |
| name: PyLops-deploy | |
| on: | |
| push: | |
| tags: ["*"] | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| jobs: | |
| build-package: | |
| name: Build & verify package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out source repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build and inspect package | |
| uses: hynek/build-and-inspect-python-package@v2 | |
| release-test-pypi: | |
| name: Publish in-dev package to test.pypi.org | |
| if: github.repository_owner == 'PyLops' && github.ref_type == 'tag' | |
| runs-on: ubuntu-latest | |
| needs: build-package | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Download package | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: Packages | |
| path: dist | |
| - name: Upload package to Test PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| attestations: true | |
| repository-url: https://test.pypi.org/legacy/ | |
| release-pypi: | |
| name: Publish released package to pypi.org | |
| if: github.repository_owner == 'PyLops' && github.event.action == 'published' | |
| runs-on: ubuntu-latest | |
| needs: build-package | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Download package | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: Packages | |
| path: dist | |
| - name: Upload package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| attestations: true |