From 7f6cb69471011278e5cc6f6c5c2bb36842a438f7 Mon Sep 17 00:00:00 2001 From: chenos Date: Tue, 16 Jul 2024 15:40:26 +0800 Subject: [PATCH] chore: update release ci --- .github/workflows/manual-release.yml | 106 +++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/.github/workflows/manual-release.yml b/.github/workflows/manual-release.yml index 828e8ab840..7f6c346fab 100644 --- a/.github/workflows/manual-release.yml +++ b/.github/workflows/manual-release.yml @@ -11,6 +11,59 @@ on: description: 'is feat' type: boolean jobs: + pre-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + repository: nocobase/nocobase + ssh-key: ${{ secrets.NOCOBASE_DEPLOY_KEY }} + persist-credentials: true + fetch-depth: 0 + - name: Checkout pro-plugins + uses: actions/checkout@v4 + with: + repository: nocobase/pro-plugins + path: packages/pro-plugins + fetch-depth: 0 + ssh-key: ${{ secrets.PRO_PLUGINS_DEPLOY_KEY }} + persist-credentials: true + - name: main -> next + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions Bot" + git checkout main + git pull origin main + git checkout next + git merge main + git push origin next + - name: main -> next + run: | + cd ./packages/pro-plugins + git checkout main + git pull origin main + git checkout next + git merge main + git push origin next + - name: push pro plugins + continue-on-error: true + uses: ad-m/github-push-action@master + with: + ssh: true + branch: next + directory: packages/pro-plugins + repository: nocobase/pro-plugins + tags: true + atomic: true + - name: push nocobase + uses: ad-m/github-push-action@master + with: + branch: next + ssh: true + repository: nocobase/nocobase + tags: true + atomic: true push-commit: runs-on: ubuntu-latest steps: @@ -61,3 +114,56 @@ jobs: repository: nocobase/nocobase tags: true atomic: true + post-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + repository: nocobase/nocobase + ssh-key: ${{ secrets.NOCOBASE_DEPLOY_KEY }} + persist-credentials: true + fetch-depth: 0 + - name: Checkout pro-plugins + uses: actions/checkout@v4 + with: + repository: nocobase/pro-plugins + path: packages/pro-plugins + fetch-depth: 0 + ssh-key: ${{ secrets.PRO_PLUGINS_DEPLOY_KEY }} + persist-credentials: true + - name: main -> next + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions Bot" + git checkout main + git pull origin main + git checkout next + git merge -X ours main + git push origin next + - name: main -> next + run: | + cd ./packages/pro-plugins + git checkout main + git pull origin main + git checkout next + git merge -X ours main + git push origin next + - name: push pro plugins + continue-on-error: true + uses: ad-m/github-push-action@master + with: + ssh: true + branch: next + directory: packages/pro-plugins + repository: nocobase/pro-plugins + tags: true + atomic: true + - name: push nocobase + uses: ad-m/github-push-action@master + with: + branch: next + ssh: true + repository: nocobase/nocobase + tags: true + atomic: true \ No newline at end of file