Merge branch 'main' of github.com:TeamCOMPAS/compas_python_utils into… #2
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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # workflow_run: | |
| # workflows: ['COMPAS compile test'] | |
| # types: | |
| # - completed | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| concurrency: release | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| ref: main | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| cache: 'pip' # Enable caching for pip dependencies | |
| - name: Semantic Version Release | |
| id: release | |
| # Adjust tag with desired version if applicable. | |
| uses: python-semantic-release/python-semantic-release@v9.12.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| git_committer_name: "github-actions" | |
| git_committer_email: "actions@users.noreply.github.com" | |
| - name: build dist for pypi | |
| if: steps.release.outputs.released == 'true' | |
| run: | | |
| python -m pip install --upgrade build | |
| python -m build --sdist --wheel --outdir dist/ | |
| - name: pypi-publish | |
| if: steps.release.outputs.released == 'true' | |
| uses: pypa/gh-action-pypi-publish@v1.12.3 |