Skip to content

Commit

Permalink
split to different workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aakrem committed Nov 15, 2024
1 parent 38c6d6b commit 945568a
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/bump-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ on:
- major

jobs:
migrate-db-schema-stage:
name: Bump version
continue-on-error: false
bump-version:
name: Bump version and create PR
runs-on: ubuntu-latest
outputs:
new_version: ${{ steps.bump_versions.outputs.NEW_VERSION }}
versions_match: ${{ steps.bump_versions.outputs.VERSIONS_MATCH }}
pr_number: ${{ steps.create-pr.outputs.pull-request-number }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -86,16 +89,23 @@ jobs:
- agenta-backend
- agenta-cli
- name: Create and push tag
if: steps.bump_versions.outputs.VERSIONS_MATCH == 'true'
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git tag -a "v${{ steps.bump_versions.outputs.NEW_VERSION }}" -m "Version ${{ steps.bump_versions.outputs.NEW_VERSION }}"
git push origin "v${{ steps.bump_versions.outputs.NEW_VERSION }}"
- name: Fail if versions don't match
if: steps.bump_versions.outputs.VERSIONS_MATCH != 'true'
run: |
echo "Versions in the three folders do not match. Please check and update manually."
exit 1
create-tag:
needs: bump-version
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create and push tag
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git tag -a "v${{ needs.bump-version.outputs.new_version }}" -m "Version ${{ needs.bump-version.outputs.new_version }}"
git push origin "v${{ needs.bump-version.outputs.new_version }}"

0 comments on commit 945568a

Please sign in to comment.