Skip to content

Commit

Permalink
add an action to publish bump versions
Browse files Browse the repository at this point in the history
  • Loading branch information
aakrem committed Feb 18, 2024
1 parent 717e5b8 commit e732602
Showing 1 changed file with 47 additions and 30 deletions.
77 changes: 47 additions & 30 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,54 @@
name: Publish a new release

on:
workflow_dispatch:
inputs:
bump-type:
description: "Bump Type"
required: true
default: "Minor"
type: choice
options:
- Patch
- Minor
- Major

workflow_dispatch:
inputs:
bump-type:
description: "Bump Type"
required: true
default: "patch"
type: choice
options:
- Patch
- Minor
- Major

jobs:
migrate-db-schema-stage:
name: Bump version
continue-on-error: false
runs-on: ubuntu-latest
environment: stage.cloud
migrate-db-schema-stage:
name: Bump version
continue-on-error: false
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Bump versions
run: |
BUMP_TYPE=${{ inputs.bump-type }}
echo "Bumping versions to $BUMP_TYPE"
cd agenta-web
npm version $BUMP_TYPE
cd ..
cd agenta-cli
poetry version $BUMP_TYPE
cd ..
cd agenta-backend
poetry version $BUMP_TYPE
- name: Bump
run: |
cd agenta-web
npm run patch
cd agenta-cli
poetry version patch
cd agenta-backend
poetry version patch
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT }}

0 comments on commit e732602

Please sign in to comment.