Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
gary-Shen committed Feb 5, 2024
1 parent c07362c commit dcb059b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: 'release'

on:
workflow_dispatch:
inputs:
changelog:
type: string
description: 'The frontend changelog'
required: true

push:
branches:
- 'main'
Expand Down Expand Up @@ -156,9 +163,19 @@ jobs:

# ====================== post release ======================

- name: Webhook message
- name: Webhook message from workflow_dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: joelwmale/webhook-action@master
with:
url: ${{ secrets.WEBHOOK_URL }}
headers: '{"Content-Type": "application/json"}'
body: '{"msgtype":"markdown","markdown":{"content":"${{ env.RELEASE_NOTES }}## Frontend changelog \n${{ inputs.changelog }}Check it out now \ud83d\udc49\ud83c\udffb [v${{ env.NEXT_VERSION }}](${{ env.PYPI_URL }})"}}'

- name: Webhook message from release
if: ${{ github.ref_name == 'main' || github.ref_name == 'alpha'}}
uses: joelwmale/webhook-action@master
with:
url: ${{ secrets.WEBHOOK_URL }}
headers: '{"Content-Type": "application/json"}'
body: '{"msgtype":"markdown","markdown":{"content":"${{ env.RELEASE_NOTES }}Check it out now \ud83d\udc49\ud83c\udffb [v${{ env.NEXT_VERSION }}](${{ env.PYPI_URL }})"}}'

11 changes: 8 additions & 3 deletions .github/workflows/trigger_from_labelu_kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ on:
- fix
- feat
- breaking-change
commit_message:
description: 'frontend commit message'
changelog:
description: 'Frontend changelog'
required: false
assets_url:
description: 'Frontend assets url'
Expand Down Expand Up @@ -66,4 +66,9 @@ jobs:
with:
commit_message: '${{ inputs.release_type }}: Update frontend from labelu-kit. See details in [release note](https://github.com/opendatalab/labelU-Kit/releases/tag/${{ inputs.version }})'
file_pattern: .VERSION
push_options: '--force'

- name: Trigger release workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: release
inputs: '{ "changelog": "${{ inputs.changelog }}" }'

0 comments on commit dcb059b

Please sign in to comment.