mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 07:35:32 +00:00
chore: create PR for master sync after release
Signed-off-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
41
.github/workflows/sync-to-develop.yml
vendored
41
.github/workflows/sync-to-develop.yml
vendored
@@ -9,15 +9,36 @@ jobs:
|
|||||||
sync-to-develop:
|
sync-to-develop:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Setup Node
|
||||||
uses: actions/checkout@v1
|
uses: actions/setup-node@v3
|
||||||
|
|
||||||
- name: Merge from master to develop
|
|
||||||
uses: wingkwong/gh-action-nightly-merge@master
|
|
||||||
with:
|
with:
|
||||||
stable_branch: 'master'
|
node-version: 18.19.1
|
||||||
development_branch: 'develop'
|
- name: Checkout
|
||||||
allow_ff: true
|
uses: actions/checkout@v3
|
||||||
allow_forks: true
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
path: nocodb
|
||||||
|
- name: Prepare GH Cli
|
||||||
|
id: gh
|
||||||
|
run: |
|
||||||
|
wget https://github.com/cli/cli/releases/download/v2.33.0/gh_2.33.0_linux_amd64.tar.gz
|
||||||
|
tar -xvf gh_2.33.0_linux_amd64.tar.gz
|
||||||
|
GH=gh_2.33.0_linux_amd64/bin/gh
|
||||||
|
echo "GH=${GH}" >> $GITHUB_OUTPUT
|
||||||
|
- name: Sync Master to Develop
|
||||||
|
id: sync
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
cd nocodb
|
||||||
|
git fetch --quiet --unshallow origin
|
||||||
|
git checkout master
|
||||||
|
BRANCH_NAME=oss/$(git rev-list -n 3 HEAD | tail -1 | cut -c1-8)
|
||||||
|
git checkout -b $BRANCH_NAME
|
||||||
|
git config user.name 'github-actions[bot]'
|
||||||
|
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
||||||
|
revertSDK=true node scripts/upgradeNocodbSdk.js
|
||||||
|
git add .
|
||||||
|
git diff-index --quiet HEAD || git commit -m "chore: update sdk path"
|
||||||
|
git push origin $BRANCH_NAME
|
||||||
|
../${{ steps.gh.outputs.GH }} pr create --title "chore: post-release sync" --body "$(echo -e "This is an automated pull request to sync the master branch to develop.\nPlease review and merge this pull request if it looks good.")" --base develop --head $BRANCH_NAME
|
||||||
|
|||||||
@@ -5,6 +5,11 @@ const execSync = require('child_process').execSync;
|
|||||||
// extract latest version from package.json
|
// extract latest version from package.json
|
||||||
const nocodbSdkPackage = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'packages', 'nocodb-sdk', 'package.json'), 'utf8'))
|
const nocodbSdkPackage = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'packages', 'nocodb-sdk', 'package.json'), 'utf8'))
|
||||||
|
|
||||||
|
|
||||||
|
if (process.env.revertSDK === 'true') {
|
||||||
|
nocodbSdkPackage.version = 'workspace:^';
|
||||||
|
}
|
||||||
|
|
||||||
const replacePackageName = (filePath) => {
|
const replacePackageName = (filePath) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
return fs.readFile(filePath, 'utf8', function (err, data) {
|
return fs.readFile(filePath, 'utf8', function (err, data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user