Skip to content

Commit

Permalink
feat(ci): create release directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Mar 1, 2025
1 parent 7c78171 commit 91cafdc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/gen-announcement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
required: true
type: string

env:
isNightly: ${{ ((!((!contains(input.tags, 'rc') && (endsWith(input.tags, '0') || endsWith(input.tags, '2') || endsWith(input.tags, '4') || endsWith(input.tags, '6') || endsWith(input.tags, '8')))))) }}

jobs:

build:
Expand Down Expand Up @@ -52,3 +55,10 @@ jobs:
with:
name: announcement.gen.md
path: target/announcement.gen.md
- name: Create GitHub Release
env:
PRERELEASE_FLAG: "${{ env.isNightly && '--prerelease' || '' }}"
ANNOUNCEMENT_TITLE: "${{ inputs.tag }}"
RELEASE_COMMIT: "${{ github.sha }}"
run: |
gh release create "${{ inputs.tag }}" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file target/announcement.gen.md --draft=true

0 comments on commit 91cafdc

Please sign in to comment.