fix: broken license label, added missing license headers #15
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
| # Copyright 2025 Terradue | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: publish-to-pypi | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - main | |
| paths: | |
| - src/** | |
| - .github/workflows/package.yaml | |
| - README.md | |
| release: | |
| types: | |
| - published | |
| pull_request: | |
| branches: | |
| - develop | |
| - main | |
| paths: | |
| - src/** | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: pip | |
| - name: Install dependencies | |
| run: | | |
| # python -m pip install --upgrade pip | |
| # python -m pip install --upgrade pip | |
| pip install hatch | |
| - name: Build package | |
| run: "hatch build \n" | |
| - name: Test package | |
| run: | | |
| # hatch test | |
| pip install nose2 | |
| pip install -e . | |
| nose2 | |
| - name: Publish package distributions to PyPI (main) | |
| if: github.ref == 'refs/heads/main' | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://upload.pypi.org/legacy/ | |
| - name: Publish package distributions to PyPI (develop) | |
| if: github.ref != 'refs/heads/main' | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ |