-
Notifications
You must be signed in to change notification settings - Fork 1.6k
75 lines (62 loc) · 2.56 KB
/
create-rc-release-pr.yaml
File metadata and controls
75 lines (62 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Create RC Release PR
on:
workflow_dispatch:
inputs:
release_version:
description: "Release version (e.g., 0.23.0-rc.1)"
required: true
ui_version:
description: "UI version (e.g., 0.22.0)"
required: true
ai_version:
description: "AI service version (e.g., 0.17.0)"
required: true
engine_version:
description: "Engine version (e.g., 0.14.7)"
required: true
permissions:
contents: write
pull-requests: write
jobs:
create-release-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Git Identity
run: |
git config --global user.name "wren-ai[bot]"
git config --global user.email "dev@cannerdata.com"
- name: Update docker.go
run: |
FILE_PATH="wren-launcher/utils/docker.go"
# Replace the WREN_PRODUCT_VERSION value with the new release version
sed -i "s/WREN_PRODUCT_VERSION\s*string = \"[^\"]*\"/WREN_PRODUCT_VERSION\tstring = \"${{ github.event.inputs.release_version }}\"/" $FILE_PATH
# Verify the changes
grep "WREN_PRODUCT_VERSION" $FILE_PATH
- name: Update .env.example
run: |
FILE_PATH="docker/.env.example"
# Update all versions in the .env.example file
sed -i "s/WREN_PRODUCT_VERSION=.*/WREN_PRODUCT_VERSION=${{ github.event.inputs.release_version }}/" $FILE_PATH
sed -i "s/WREN_ENGINE_VERSION=.*/WREN_ENGINE_VERSION=${{ github.event.inputs.engine_version }}/" $FILE_PATH
sed -i "s/IBIS_SERVER_VERSION=.*/IBIS_SERVER_VERSION=${{ github.event.inputs.engine_version }}/" $FILE_PATH
sed -i "s/WREN_AI_SERVICE_VERSION=.*/WREN_AI_SERVICE_VERSION=${{ github.event.inputs.ai_version }}/" $FILE_PATH
sed -i "s/WREN_UI_VERSION=.*/WREN_UI_VERSION=${{ github.event.inputs.ui_version }}/" $FILE_PATH
# Verify the changes
grep "VERSION" $FILE_PATH
- name: Show git status
run: git status
- name: Show git diff
run: |
echo "===== Git diff for changed files ====="
git diff
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
base: main
branch: "release/${{ github.event.inputs.release_version }}"
commit-message: "release ${{ github.event.inputs.release_version }}"
title: "Release ${{ github.event.inputs.release_version }}"
body: "Release ${{ github.event.inputs.release_version }}"
draft: false