Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakorgaur committed Apr 12, 2024
1 parent 4f59117 commit 8852597
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/bump_version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
pull_request:
branches:
- main
types: [closed]

jobs:
bump_version:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
- id: cz
name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
continue-on-error: true
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Print Version
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
28 changes: 2 additions & 26 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
on:
push:
branches: [main]
tags:
- "v*.*.*"

jobs:
bump_version:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
steps:
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
- id: cz
name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
continue-on-error: true
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Print Version
run: echo "Bumped to version ${{ steps.cz.outputs.version }}"
outputs:
outcome: ${{ steps.cz.outcome }}
conclusion: ${{ steps.cz.conclusion }}

release:
# if a bump version failed or was not executed, do not release
needs: bump_version
runs-on: ubuntu-latest
if: needs.bump_version.outputs.outcome == 'success' || needs.bump_version.outputs.conclusion == 'success'
steps:
- name: Install Poetry
uses: snok/install-poetry@v1
Expand Down

0 comments on commit 8852597

Please sign in to comment.