Skip to content

fix: types and example #31

fix: types and example

fix: types and example #31

Workflow file for this run

name: push-tags
on:
push:
tags: [v*]
jobs:
release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get commit message
run: |
BODY=$(git log -1 --pretty=format:%B)
echo "$BODY"
echo "body=$BODY" >> "$GITHUB_OUTPUT"
id: commit-message
- name: Check if prerelease
run: |
TAG=$(git describe --abbrev=0 --tags)
echo "$TAG"
[[ "$TAG" == *-* ]] && PRERELEASE="true" || PRERELEASE="false"
echo "$PRERELEASE"
echo "prerelease=$PRERELEASE" >> "$GITHUB_OUTPUT"
id: version
- name: Create release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
${{ steps.commit-message.outputs.body }}
draft: true
prerelease: ${{ steps.version.outputs.prerelease == 'true' && true || false }}