Merge pull request #67 from Global-Health-Engineering/dev #35
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_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| release: | |
| name: Create release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, 'bump') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Install build dependencies | |
| run: uv tool install build | |
| - name: Build package | |
| run: | | |
| uv tool run --from build pyproject-build --wheel --outdir dist/ | |
| - name: Generate changelog and create release | |
| id: changelog | |
| uses: TriPSs/conventional-changelog-action@v6 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| tag-prefix: "v" | |
| output-file: "CHANGELOG.md" | |
| release-count: 10 | |
| version-file: './pyproject.toml' | |
| version-path: 'project.version' | |
| skip-on-empty: true | |
| skip-version-file: true | |
| preset: 'conventionalcommits' | |
| version-type: 'minor' | |
| - name: Create GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| if: steps.changelog.outputs.skipped == 'false' | |
| with: | |
| tag_name: ${{ steps.changelog.outputs.tag }} | |
| name: ${{ steps.changelog.outputs.tag }} | |
| body: ${{ steps.changelog.outputs.clean_changelog }} | |
| files: | | |
| dist/*.whl | |
| CHANGELOG.md | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |