From 5009a7d07ef7c214f1556307c4a06d5f95fbf115 Mon Sep 17 00:00:00 2001 From: gary-Shen Date: Mon, 5 Feb 2024 19:33:10 +0800 Subject: [PATCH] chore: update ci --- .github/workflows/release.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 162d914..fa6e2b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,6 +49,11 @@ jobs: with: submodules: recursive + - name: Get next version + id: get-next-version + run: | + echo "NEXT_VERSION=$(echo "${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }}")" >> $GITHUB_ENV + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -62,12 +67,12 @@ jobs: - name: Set test pip url if: ${{ github.ref_name == 'alpha' }} run: | - echo "PYPI_URL=https://test.pypi.org/project/labelu/${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }}" >> $GITHUB_ENV + echo "PYPI_URL=https://test.pypi.org/project/labelu/${{ env.NEXT_VERSION }}" >> $GITHUB_ENV - name: Set release pip url if: ${{ github.ref_name == 'main' }} run: | - echo "PYPI_URL=https://pypi.org/project/labelu/${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }}" >> $GITHUB_ENV + echo "PYPI_URL=https://pypi.org/project/labelu/${{ env.NEXT_VERSION }}" >> $GITHUB_ENV - name: Show pypi url run: | @@ -77,7 +82,7 @@ jobs: uses: satackey/action-js-inline@v0.0.2 id: InjectBackend env: - NEXT_VERSION: ${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }} + NEXT_VERSION: ${{ env.NEXT_VERSION }} with: required-packages: '@iarna/toml' script: | @@ -141,7 +146,7 @@ jobs: - name: Commit version change uses: stefanzweifel/git-auto-commit-action@v4 with: - commit_message: 'chore: Upgrade to v${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }} [skip ci]' + commit_message: 'chore: Upgrade to v${{ env.NEXT_VERSION }} [skip ci]' file_pattern: pyproject.toml - name: Publish to TestPyPi @@ -180,4 +185,4 @@ jobs: with: url: ${{ secrets.WEBHOOK_URL }} headers: '{"Content-Type": "application/json"}' - body: '{"msgtype":"markdown","markdown":{"content":"${{ needs.prepare.steps.dry-run.outputs.RELEASE_NOTES }}${{ env.CHANGELOG }}Check it out now \ud83d\udc49\ud83c\udffb [v${{ needs.prepare.steps.dry-run.outputs.NEXT_VERSION }}](${{ env.PYPI_URL }})"}}' + body: '{"msgtype":"markdown","markdown":{"content":"${{ needs.prepare.steps.dry-run.outputs.RELEASE_NOTES }}${{ env.CHANGELOG }}Check it out now \ud83d\udc49\ud83c\udffb [v${{ env.NEXT_VERSION }}](${{ env.PYPI_URL }})"}}'