Skip to content

Commit

Permalink
release drafter の設定変更
Browse files Browse the repository at this point in the history
  • Loading branch information
warahiko committed Oct 27, 2023
1 parent a025ea2 commit dddf7f8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
name-template: 'v$NEXT_PATCH_VERSION 🌈'
tag-template: 'v$NEXT_PATCH_VERSION'
template: |
## What’s Changed
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/update-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,29 @@ name: Update release

on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-alpha[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+"

jobs:
update_draft_release:
runs-on: ubuntu-latest
steps:
- name: Detect unstable release
id: detect_unstable_release
run: |
set -ev
stable_regex="^v[0-9]+\.[0-9]+\.[0-9]+$"
is_prerelease=$( if [[ ${{ github.ref_name }} =~ $stable_regex ]]; then echo "false"; else echo "true"; fi )
echo "IS_PRERELEASE=$is_prerelease" >> $GITHUB_OUTPUT
- uses: release-drafter/release-drafter@v5
with:
name: ${{ github.ref_name }} 🌈
tag: ${{ github.ref_name }}
version: ${{ github.ref_name }}
prerelease: ${{ steps.detect_unstable_release.outputs.IS_PRERELEASE }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit dddf7f8

Please sign in to comment.