Skip to content

Commit

Permalink
Merge pull request #80 from opendatalab/dev
Browse files Browse the repository at this point in the history
fix: update ci
  • Loading branch information
gary-Shen authored Feb 5, 2024
2 parents 72cdb92 + 7ab514d commit 587be98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,27 @@ jobs:
verbose: true

- name: Manage version
if: ${{ env.NEXT_VERSION != '' }}
run: |
sed -i "s/^version[ ]*=.*/version = '${NEXT_VERSION}'/" pyproject.toml
- name: Commit version change
if: ${{ env.NEXT_VERSION != '' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore: Upgrade to v${{ env.NEXT_VERSION }} [skip ci]'
file_pattern: pyproject.toml

- name: Publish to TestPyPi
if: ${{ github.ref_name == 'alpha' }}
if: ${{ github.ref_name == 'alpha' && env.NEXT_VERSION != ''}}
env:
TEST_PYPI_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
poetry config pypi-token.testpypi $TEST_PYPI_TOKEN
poetry publish --build --skip-existing -r testpypi
- name: Publish to PyPi
if: ${{ github.ref_name == 'main' }}
if: ${{ github.ref_name == 'main' && env.NEXT_VERSION != ''}}
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
Expand All @@ -164,6 +166,7 @@ jobs:
# ====================== post release ======================

- name: Send webhook message
if: ${{ env.RELEASE_NOTES != '' }}
uses: joelwmale/webhook-action@master
env:
CHANGELOG: ${{ github.event.inputs.changelog != '' && format('## Frontend changelog \n{0}\n\n\n', github.event.inputs.changelog) || '' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger_from_labelu_kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ jobs:
uses: benc-uk/workflow-dispatch@v1
with:
workflow: release
inputs: '{ "changelog": "${{ inputs.changelog }}" }'
inputs: '{ "changelog": `${{ inputs.changelog }}` }'

0 comments on commit 587be98

Please sign in to comment.