-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.4 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
# On pushing to a new release branch auto version bump is
# performed from latest release, changelog modified,
# versions modified (cocogitto) and a pull request
# for merging into main is created
name: CI/CD Release
on:
push:
branches:
- 'release/*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Conventional commits check
uses: oknozor/cocogitto-action@v3
with:
check-latest-tag-only: true
- name: Generate release version
id: release
run: |
VERSION=$(cog bump --dry-run --auto)
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Auto bump version and commit
run: |
cog bump --auto
git push origin "release/${{ steps.release.outputs.version }}"
git push origin "${{ steps.release.outputs.version }}"
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Merge release ${{ steps.release.outputs.version }}'
title: '[RELEASE] Merge release ${{ steps.release.outputs.version }} into main'
body: 'This is an automated pull request to merge changes from the release/${{ steps.release.outputs.version }} into main'
branch: "release/${{ steps.release.outputs.version }}"
base: main