Build, Test and Publish #4
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, Test and Publish | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Upgrade pip and install requests | |
| run: python -m pip install --upgrade build requests | |
| - name: Download the NAIF DE440 file | |
| run: python naif_de440/fetch.py | |
| - name: Install naif_de440 | |
| run: pip install .[tests] | |
| - name: Test naif_de440 | |
| run: pytest . | |
| - name: Build Source Distribution and Wheel | |
| run: python -m build --sdist --wheel --outdir dist/ . | |
| - name: Publish naif_de440 to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| attestations: false | |
| verbose: true |