feat(inputs): Expose python-version param #14
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
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| bump: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| actions: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Set up git config | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - uses: commitizen-tools/setup-cz@main | |
| - uses: pndurette/gh-actions-auto-docs@v1 | |
| with: | |
| git_push: false | |
| action_yaml_file: ./action.yaml | |
| heading_size: 2 | |
| - id: bump-version | |
| run: | | |
| cz bump --yes | |
| current_version="v$(cz version -p)" | |
| major_version="v$(cz version -p --major)" | |
| echo "current_version=$current_version" >> $GITHUB_OUTPUT | |
| echo "major_version=$major_version" >> $GITHUB_OUTPUT | |
| - name: Update major tag | |
| env: | |
| CURRENT_VERSION: ${{ steps.bump-version.outputs.current_version }} | |
| MAJOR_VERSION: ${{ steps.bump-version.outputs.major_version }} | |
| run: | | |
| # Push new commit + new tag | |
| git push --follow-tags | |
| # Move major tag to the latest commit | |
| git tag -fa "${MAJOR_VERSION}" -m "release ${CURRENT_VERSION}" | |
| # Force push new major tag | |
| git push origin "${MAJOR_VERSION}" -f | |
| - name: Build changelog | |
| env: | |
| CURRENT_VERSION: ${{ steps.bump-version.outputs.current_version }} | |
| run: | | |
| cz changelog --dry-run "${CURRENT_VERSION}" > .changelog.md | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body_path: ".changelog.md" | |
| tag_name: ${{ steps.bump-version.outputs.current_version }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |