Skip to content

Commit

Permalink
ci: replace 'create-release action' with gh cli (#68)
Browse files Browse the repository at this point in the history
* ci: replace 'create-release action' with gh cli

* Update .github/workflows/release.yml

Co-authored-by: Shoma Okamoto <32533860+shmokmt@users.noreply.github.com>

---------

Co-authored-by: Shoma Okamoto <32533860+shmokmt@users.noreply.github.com>
  • Loading branch information
shogo82148 and shmokmt committed Sep 9, 2023
1 parent 2032fe0 commit d62abbd
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/release.yml
@@ -1,14 +1,17 @@
name: release

on:
push:
branches:
- master
tags:
- 'v*.*.*'
- "v*.*.*"
pull_request:
types:
- labeled

jobs:
release:
if: github.event.action != 'labeled'
runs-on: ubuntu-latest

steps:
Expand All @@ -35,15 +38,20 @@ jobs:
if_true: ${{ github.ref }}
if_false: ${{ steps.bumpr.outputs.next_version }}

# Create release.
- uses: actions/create-release@v1
if: "steps.tag.outputs.value != ''"
# Create release
- if: "steps.tag.outputs.value != ''"
env:
TAG_NAME: ${{ steps.tag.outputs.value }}
BODY: ${{ steps.bumpr.outputs.message }}
# This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.value }}
release_name: Release ${{ steps.tag.outputs.value }}
body: ${{ steps.bumpr.outputs.message }}
draft: false
prerelease: false
run: |
gh release create "${TAG_NAME}" -t "Release ${TAG_NAME/refs\/tags\//}" --notes "${BODY}"
release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Post bumpr status comment
uses: haya14busa/action-bumpr@v1

0 comments on commit d62abbd

Please sign in to comment.