docs(bumpversion): v10.0.0 → 10.1.0 #39
This file contains 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: Bump version | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
bumpversion: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.tag_version.outputs.new_version }} | |
previous_tag: ${{ steps.tag_version.outputs.previous_tag }} | |
bump_commit_sha: ${{ steps.bumpversion.outputs.commit_hash }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.DEDALO_PAT }} | |
- name: Get next version | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
default_bump: false | |
default_prerelease_bump: false | |
dry_run: true | |
- name: Set up Python 3.8 | |
uses: actions/[email protected] | |
with: | |
python-version: "3.8" | |
- name: Create bumpversion | |
if: steps.tag_version.outputs.new_version | |
run: | | |
pip install bumpversion | |
bumpversion --new-version ${{ steps.tag_version.outputs.new_version }} setup.cfg | |
- name: Update Changelog | |
if: steps.tag_version.outputs.new_version | |
uses: stefanzweifel/[email protected] | |
with: | |
latest-version: ${{ steps.tag_version.outputs.new_tag }} | |
release-notes: ${{ steps.tag_version.outputs.changelog }} | |
- name: Commit bumpversion | |
id: bumpversion | |
if: steps.tag_version.outputs.new_version | |
uses: stefanzweifel/[email protected] | |
with: | |
branch: ${{ github.ref }} | |
commit_message: "docs(bumpversion): ${{ steps.tag_version.outputs.previous_tag }} → ${{ steps.tag_version.outputs.new_version }}" | |
file_pattern: setup.cfg CHANGELOG.md eox_tenant/* | |
release: | |
needs: bumpversion | |
if: needs.bumpversion.outputs.version | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
changelog: ${{ steps.tag_version.outputs.changelog }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.DEDALO_PAT }} | |
- name: Create tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
commit_sha: ${{ needs.bumpversion.outputs.bump_commit_sha }} | |
default_bump: false | |
default_prerelease_bump: false | |
- name: Create a GitHub release | |
if: steps.tag_version.outputs.new_tag | |
uses: ncipollo/[email protected] | |
with: | |
tag: ${{ steps.tag_version.outputs.new_tag }} | |
name: Release ${{ steps.tag_version.outputs.new_tag }} | |
body: ${{ steps.tag_version.outputs.changelog }} | |
draft: true |