From b170c286f6767caaf091fc7227a3ea6a728466c4 Mon Sep 17 00:00:00 2001 From: chenos Date: Fri, 18 Apr 2025 14:34:11 +0800 Subject: [PATCH] fix: ref_name --- .github/workflows/release-pro.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-pro.yml b/.github/workflows/release-pro.yml index 9409ed858d..84a6b6dbdd 100644 --- a/.github/workflows/release-pro.yml +++ b/.github/workflows/release-pro.yml @@ -5,7 +5,10 @@ concurrency: cancel-in-progress: true on: - push: + workflow_dispatch: + inputs: + ref_name: + description: 'Branch or tag name to release' jobs: get-plugins: @@ -28,10 +31,10 @@ jobs: id: get-info shell: bash run: | - if [[ "${{ github.ref_name }}" =~ "beta" ]]; then + if [[ "${{ inputs.ref_name || github.ref_name }}" =~ "beta" ]]; then echo "defaultTag=$(echo 'beta')" >> $GITHUB_OUTPUT echo "proRepos=$(echo '${{ needs.get-plugins.outputs.beta-plugins }}')" >> $GITHUB_OUTPUT - elif [[ "${{ github.ref_name }}" =~ "alpha" ]]; then + elif [[ "${{ inputs.ref_name || github.ref_name }}" =~ "alpha" ]]; then echo "defaultTag=$(echo 'alpha')" >> $GITHUB_OUTPUT echo "proRepos=$(echo '${{ needs.get-plugins.outputs.alpha-plugins }}')" >> $GITHUB_OUTPUT else @@ -49,7 +52,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: ${{ github.ref_name }} + ref: ${{ inputs.ref_name || github.ref_name }} - name: yarn install run: | yarn install @@ -58,14 +61,14 @@ jobs: with: repository: nocobase/pro-plugins path: packages/pro-plugins - ref: ${{ github.ref_name }} + ref: ${{ inputs.ref_name || github.ref_name }} token: ${{ steps.app-token.outputs.token }} - name: Clone pro repos shell: bash run: | for repo in ${{ join(fromJSON(steps.get-info.outputs.proRepos), ' ') }} ${{ join(fromJSON(needs.get-plugins.outputs.custom-plugins), ' ') }} do - git clone -b ${{ github.ref_name }} https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo + git clone -b ${{ inputs.ref_name || github.ref_name }} https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/nocobase/$repo.git packages/pro-plugins/@nocobase/$repo done - name: Set up QEMU uses: docker/setup-qemu-action@v2