-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add an action to publish bump versions
- Loading branch information
Showing
1 changed file
with
47 additions
and
30 deletions.
There are no files selected for viewing
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
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 }} |