8a21a212f8
Deploy Documentation / deploy (push) Has been cancelled
Canary / build-cli (push) Has been skipped
Canary / Upload Install Script (push) Has been skipped
Canary / bundle-desktop (push) Has been skipped
Canary / bundle-desktop-intel (push) Has been skipped
Canary / bundle-desktop-linux (push) Has been skipped
Canary / bundle-desktop-windows (push) Has been skipped
Canary / bundle-desktop-windows-cuda (push) Has been skipped
Canary / Release (push) Has been skipped
Cargo Deny / deny (push) Has been skipped
Unused Dependencies / machete (push) Has been skipped
Canary / Prepare Version (push) Failing after 1s
Live Provider Tests / check-fork (push) Failing after 0s
Create Minor Release PR / check-version-bump-pr (push) Has been skipped
Publish Ask AI Bot Docker Image / docker (push) Failing after 1s
Live Provider Tests / changes (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Has been skipped
Publish Docker Image / docker (push) Failing after 1s
CI / changes (push) Failing after 8s
Create Minor Release PR / release (push) Has been skipped
Live Provider Tests / Smoke Tests (push) Has been cancelled
Live Provider Tests / Smoke Tests (Code Execution) (push) Has been cancelled
Live Provider Tests / Compaction Tests (push) Has been cancelled
CI / Build Rust Project on Windows (push) Has been cancelled
Live Provider Tests / Build Binary (push) Has been cancelled
CI / Lint Rust Code (push) Has been cancelled
CI / Check Generated Schemas are Up-to-Date (push) Has been cancelled
CI / Test and Lint Electron Desktop App (push) Has been cancelled
CI / Check Rust Code Format (push) Has been cancelled
CI / Build and Test Rust Project (push) Has been cancelled
CI / Check MSRV (push) Has been cancelled
102 lines
3.1 KiB
YAML
102 lines
3.1 KiB
YAML
name: Create Version Bump PR
|
|
|
|
on:
|
|
workflow_call:
|
|
secrets:
|
|
ANTHROPIC_API_KEY:
|
|
required: false
|
|
OPENAI_API_KEY:
|
|
required: false
|
|
GOOGLE_API_KEY:
|
|
required: false
|
|
OPENROUTER_API_KEY:
|
|
required: false
|
|
XAI_API_KEY:
|
|
required: false
|
|
TETRATE_API_KEY:
|
|
required: false
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
create-version-bump:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
ref: main
|
|
fetch-depth: 0
|
|
|
|
- uses: cashapp/activate-hermit@cea9af7913204a965fd488637a8d1811bba2e616 # v1
|
|
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
sudo apt update -y
|
|
sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev
|
|
|
|
- name: Compute version and create bump branch
|
|
env:
|
|
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
|
|
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
|
|
TETRATE_API_KEY: ${{ secrets.TETRATE_API_KEY }}
|
|
run: |
|
|
VERSION=$(just get-next-minor-version)
|
|
echo "version=$VERSION" >> $GITHUB_ENV
|
|
echo "Version: $VERSION (minor bump on main)"
|
|
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git config --local user.name "github-actions[bot]"
|
|
|
|
BRANCH_NAME="version-bump/$VERSION"
|
|
git switch -C "$BRANCH_NAME"
|
|
|
|
just prepare-release $VERSION
|
|
|
|
echo "branch_name=$BRANCH_NAME" >> $GITHUB_ENV
|
|
|
|
- name: Push bump branch
|
|
run: |
|
|
git push --force-with-lease origin "${{ env.branch_name }}"
|
|
|
|
- name: Create Pull Request if needed
|
|
run: |
|
|
EXISTING_PR_URL=$(gh pr list \
|
|
--base main \
|
|
--head "${{ env.branch_name }}" \
|
|
--state open \
|
|
--json url \
|
|
--jq '.[0].url // empty')
|
|
|
|
if [ -n "$EXISTING_PR_URL" ]; then
|
|
echo "Existing PR found: $EXISTING_PR_URL"
|
|
echo "pr_url=$EXISTING_PR_URL" >> $GITHUB_ENV
|
|
exit 0
|
|
fi
|
|
|
|
PR_BODY=$(cat <<'EOF'
|
|
Bumps version to **${{ env.version }}**.
|
|
|
|
**Please follow these steps:**
|
|
|
|
1. Approve workflows for this PR to trigger CI checks.
|
|
2. Review and resolve any merge conflicts.
|
|
3. Approve and merge this PR.
|
|
4. The `release/${{ env.version }}` PR will be created automatically.
|
|
EOF
|
|
)
|
|
PR_URL=$(gh pr create \
|
|
-B main \
|
|
-H "${{ env.branch_name }}" \
|
|
--title "chore(release): bump version to ${{ env.version }} (minor)" \
|
|
--body "$PR_BODY")
|
|
echo "pr_url=$PR_URL" >> $GITHUB_ENV
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|