-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 1.93 KB
/
release-pr.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release PR
on:
workflow_dispatch:
inputs:
type:
type: choice
description: Choose release type
options:
- auto
- patch
- minor
- major
default: auto
jobs:
releaseIt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Install dependancies
run: yarn install --frozen-lockfile
- name: Prepare release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPE_ARG: ${{ fromJSON('{"auto":"", "patch":"patch", "minor":"minor", "major":"major"}')[github.event.inputs.type] }}
run: yarn run release $TYPE_ARG --ci --verbose --no-git.push --no-git.commit --no-git.tag --no-github
- name: Show git status
if: failure()
run: git status && git diff
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
- name: Create pull request
uses: peter-evans/create-pull-request@v4
id: cpr
with:
branch: release
delete-branch: true
commit-message: 'chore(release): v${{ steps.package-version.outputs.current-version}}'
title: '[Release] v${{ steps.package-version.outputs.current-version}}'
body: |
Release notes for this release found in (CHANGELOG.md)[./CHANGELOG.md]
labels: |
release
automated pr
signoff: false
draft: false