Skip to content

Commit

Permalink
♻️ci: check github release (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marukome0743 authored Oct 22, 2024
1 parent 1890585 commit e01dd45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
permissions:
contents: write

env:
VERSION: ${{ github.event.inputs.version || github.ref_name }}

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -23,16 +26,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Check if the tag has already been released
run: |
if [[ $(git tag -l $VERSION) ]]; then
echo TAG_EXISTS=true >> $GITHUB_ENV
fi
- name: Check if the release has already been created
run: echo RELEASE_EXISTS=$(gh release list | grep "$VERSION") >> $GITHUB_ENV

- name: Create release
if: env.TAG_EXISTS != 'true'
run: gh release create $VERSION --generate-notes -t "$REPO_NAME $VERSION"
if: env.RELEASE_EXISTS == ''
run: gh release create "$VERSION" --generate-notes -t "$REPO_NAME $VERSION"
env:
GH_TOKEN: ${{ github.token }}
REPO_NAME: ${{ github.event.repository.name }}
VERSION: ${{ github.event.inputs.version || github.ref_name }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rasnage",
"version": "0.5.3",
"version": "0.5.4",
"private": true,
"scripts": {
"dev": "next dev --turbo",
Expand Down

0 comments on commit e01dd45

Please sign in to comment.