Skip to content

Create Draft Release #3

Create Draft Release

Create Draft Release #3

name: Create Draft Release
on:
workflow_dispatch:
inputs:
ref:
description: "Branch, tag or SHA to release"
required: true
type: string
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: pnpm/[email protected]
with:
version: 8.5.1
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: "${{ inputs.ref }}"
fetch-depth: 0
- name: Generate version
id: generate-version
uses: paulhatch/[email protected]
with:
tag_prefix: "v"
major_pattern: "^([A-Za-z]+.)*!:.*$"
major_regexp_flags: "g"
minor_pattern: "feat"
version_format: "v${major}.${minor}.${patch}"
- name: Print release version
run: echo "NEW_VERSION=${{ steps.generate-version.outputs.version }}"
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: "${{ steps.generate-version.outputs.version }}"
name: ${{ steps.generate-version.outputs.version }}
draft: true
makeLatest: false
prerelease: true
allowUpdates: true
updateOnlyUnreleased: true
generateReleaseNotes: true