-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (46 loc) · 1.58 KB
/
cocogitto.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
name: cocogitto
on: [push]
jobs:
cog_check_job:
runs-on: ubuntu-latest
name: check commits with cocogitto
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Conventional commits compliance check
uses: oknozor/cocogitto-action@v3
with:
check-latest-tag-only: true
git-user: 'yoctoyotta1024'
git-user-email: 'yoctoyotta1024@yahoo.com'
release:
needs: cog_check_job
# Only release new version when merging into `origin/main`.`
if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'yoctoyotta1024'"
permissions:
contents: write
runs-on: ubuntu-latest
name: Perform semantic versioning release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: semver release with cocogitto
uses: oknozor/cocogitto-action@v3
id: release
with:
release: true
check-latest-tag-only: true
git-user: 'yoctoyotta1024'
git-user-email: 'yoctoyotta1024@yahoo.com'
# The version number is accessible as a github action output
- name: Print version
run: "echo '${{ steps.release.outputs.version }}'"
- name: Generate Changelog
run: cog changelog --at ${{ steps.release.outputs.version }} -t remote > GITHUB_CHANGELOG.md
- name: Upload github release
uses: softprops/action-gh-release@v2
with:
body_path: GITHUB_CHANGELOG.md
tag_name: ${{ steps.release.outputs.version }}