-
-
Notifications
You must be signed in to change notification settings - Fork 12
51 lines (40 loc) · 1.17 KB
/
release.yaml
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
---
name: ci
run-name: Perform release from latest tag
permissions:
contents: write
on:
push:
tags: ['*']
jobs:
release:
name: Create a GitHub release
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: >-
git config user.name github-actions;
git config user.email github-actions@github.com;
git config --global user.email github-actions@github.com;
git config --global user.name github-actions;
- name: Fetch latest tag
run: >-
echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)"
>> "$GITHUB_ENV"
- name: SemVer release
uses: cocogitto/cocogitto-action@v3.5
id: relase
- name: Generate changelog
run: >-
cog changelog --at ${{env.LATEST_TAG }} --template
remote > GITHUB_CHANGELOG.md
- name: print
run: echo ${{ env.LATEST_TAG }}
- name: Upload github release
uses: softprops/action-gh-release@v1
with:
body_path: GITHUB_CHANGELOG.md
tag_name: ${{ env.LATEST_TAG }}