Skip to content

Commit

Permalink
ci: Main CI should be workflow_call'able
Browse files Browse the repository at this point in the history
  • Loading branch information
polyfloyd committed Jan 20, 2024
1 parent d6c608b commit 35e0aa5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Bump

on:
workflow_dispatch:

jobs:

ci:
uses: ./.github/workflows/ci.yml

bump:
runs-on: ubuntu-latest

needs:
- ci

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ssh-key: "${{ secrets.DEPLOY_SSH_KEY }}"
- run: pip3 install Commitizen==3.12.0 setuptools-scm>=8.0

- run: git config --local user.email "[email protected]"
- run: git config --local user.name "github-actions"

- name: Get new version
run: echo "NEW_VERSION=$(cz bump --dry-run | grep -Po 'v\K([0-9]+(\.[0-9]+)+)')" >> $GITHUB_ENV
- name: Update Cargo.toml
run: sed -i 's/^version =.\+$/version = "${{ env.NEW_VERSION }}"/' Cargo.toml
- run: cz bump --changelog

- run: git push
- run: git push --tags
1 change: 1 addition & 0 deletions .github/workflows/main.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- main
workflow_call:

jobs:

Expand Down

0 comments on commit 35e0aa5

Please sign in to comment.