-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (58 loc) · 1.77 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: release
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch for release'
required: true
default: 'main'
releaseType:
description: 'Type of release'
type: choice
required: true
default: 'patch'
options:
- major
- patch
- minor
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Update changelog
id: update_changelog
uses: release-flow/keep-a-changelog-action@v2
with:
command: bump
version: ${{ github.event.inputs.releaseType }}
tag-prefix: ''
keep-unreleased-section: true
- name: Display version number
run: |
echo "New release version: ${{ steps.update_changelog.outputs.version }}"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: json, dom, curl, libxml, mbstring
coverage: none
- name: Install Pint
run: composer global require laravel/pint
- name: Run Pint
run: pint src && pint tests
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ github.event.inputs.branch }}
commit_message: Prepare Release ${{ steps.update_changelog.outputs.version }}
- name: Create the tag
run: git tag ${{ steps.update_changelog.outputs.version }}
- name: Create the release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.update_changelog.outputs.version }}
body: ${{ steps.update_changelog.outputs.release-notes }}