release 1.13.0 #25
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release 🚀 | |
| on: | |
| push: | |
| tags: | |
| - "*" # 推送 v* 形式的 tag 时触发 | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Release tag to create (e.g. 1.2.3)' | |
| required: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Create Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| INPUT_TAG: ${{ github.event.inputs.tag }} | |
| run: | | |
| if [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then | |
| TAG_NAME="${GITHUB_REF#refs/tags/}" | |
| else | |
| TAG_NAME="${INPUT_TAG}" | |
| fi | |
| echo "Creating release for $TAG_NAME" | |
| gh release create "$TAG_NAME" \ | |
| --generate-notes \ | |
| --title "$TAG_NAME" |