-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (43 loc) · 1.3 KB
/
create_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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