chore: upagrade numpy (#67) #20
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: Publish Python distribution to Pypi | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| name: Build distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Install pypa/build | |
| run: >- | |
| python3 -m | |
| pip install | |
| build | |
| --user | |
| - name: Build a binary wheel and a source tarball | |
| run: python3 -m build | |
| - name: Store the distribution packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| publish-to-pypi: | |
| name: Publish Python distribution to PyPI | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: | |
| - build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/heatrapy | |
| permissions: | |
| id-token: write # IMPORTANT: mandatory for trusted publishing | |
| steps: | |
| - name: Download all the dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| - name: Publish distribution to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| create-new-release: | |
| name: Create new Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: | |
| - publish-to-pypi | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Generate a changelog based on the tag | |
| - name: Get Previous Tag | |
| id: previous_tag | |
| run: | | |
| git fetch --tags --force | |
| previous_tag=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1)) | |
| echo "previous_tag=$previous_tag" >> $GITHUB_ENV | |
| - name: Generate Changelog for Release | |
| id: changelog_gen | |
| uses: heinrichreimer/action-github-changelog-generator@v2.3 | |
| with: | |
| sinceTag: ${{ env.previous_tag }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Create a new release using the changelog | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| body: ${{ steps.changelog_gen.outputs.changelog }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |