From 789f2dfcd7ec2acb0c713515763ecb290f27846f Mon Sep 17 00:00:00 2001 From: Col0ring <1561999073@qq.com> Date: Mon, 16 Dec 2024 15:57:11 +0800 Subject: [PATCH] fix: ci --- .github/workflows/publish.yaml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e060794a..84628c91 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -16,32 +16,37 @@ jobs: timeout-minutes: 15 runs-on: ubuntu-latest steps: - - name: Get the Last Commit Message - run: | - echo "COMMIT_MESSAGE=$(git log --format=%s -n 1)" >> $GITHUB_ENV + - name: Debug Commit Message + run: echo "Commit message: ${{ github.event.head_commit.message }}" - name: Checkout Code Repository - if: env.COMMIT_MESSAGE == 'chore: update versions' + if: | + github.event.head_commit.message == 'chore: update versions' uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python 3.12 - if: env.COMMIT_MESSAGE == 'chore: update versions' + if: | + ${{ github.event.head_commit.message == 'chore: update versions' }} uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install Python Dependencies - if: env.COMMIT_MESSAGE == 'chore: update versions' + if: | + ${{ github.event.head_commit.message == 'chore: update versions' }} run: pip install gradio twine build - name: Setup Node.js - if: env.COMMIT_MESSAGE == 'chore: update versions' + if: | + ${{ github.event.head_commit.message == 'chore: update versions' }} uses: actions/setup-node@v3 with: node-version: 20 - name: Install Pnpm - if: env.COMMIT_MESSAGE == 'chore: update versions' + if: | + ${{ github.event.head_commit.message == 'chore: update versions' }} run: npm i pnpm@latest -g - name: Install Node Dependencies - if: env.COMMIT_MESSAGE == 'chore: update versions' + if: | + ${{ github.event.head_commit.message == 'chore: update versions' }} run: pnpm install # - name: Create Release Pull Request to Update Versions # id: changesets @@ -54,7 +59,8 @@ jobs: # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Build Packages and Publish to PyPI # if: steps.changesets.outputs.hasChangesets != 'true' - if: env.COMMIT_MESSAGE == 'chore: update versions' + if: | + ${{ github.event.head_commit.message == 'chore: update versions' }} id: publish run: pnpm run ci:publish env: