-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (37 loc) · 1.18 KB
/
create-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
name: Create Release
on:
push:
branches:
- main
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get latest version
id: get_version
run: |
latest_tag=$(git describe --tags --abbrev=0)
version=$(echo $latest_tag | sed 's/v//')
IFS='.' read -ra version_parts <<< "$version"
major=${version_parts[0]}
minor=${version_parts[1]}
patch=$((${version_parts[2]}+1))
new_version="$major.$minor.$patch"
echo "new_version=$new_version" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.new_version }}
release_name: Release ${{ steps.get_version.outputs.new_version }}
body: |
This is an automated release created on push to the main branch.
Fullcalendar example site updated.
draft: false
prerelease: false