Skip to content

Commit 91a1085

Browse files
committed
Automatic versioning.
1 parent 05a647b commit 91a1085

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: "Version Stamp Release"
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
branches:
9+
- main
10+
jobs:
11+
build:
12+
name: Build
13+
if: github.event_name == 'push' && contains(toJson(github.event.commits),
14+
'***NO_CI***') == false && contains(toJson(github.event.commits), '[ci
15+
skip]') == false && contains(toJson(github.event.commits), '[skip ci]') ==
16+
false
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@f1d3225b5376a0791fdee5a0e8eac5289355e43a # pin@v2
20+
with:
21+
fetch-depth: 0
22+
release:
23+
name: Create Release
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@f1d3225b5376a0791fdee5a0e8eac5289355e43a # pin@v2
27+
with:
28+
fetch-depth: 0
29+
- name: "Create release version string"
30+
id: create_version
31+
uses: paulhatch/semantic-version@ed818a75eb51eee5b4072b72a07031cd52a9f09f # pin@v4.0.1
32+
with:
33+
branch: "main"
34+
tag_prefix: "v"
35+
major_pattern: "(MAJOR)"
36+
minor_pattern: "(MINOR)"
37+
format: "${major}.${minor}.${patch}"
38+
# change_path: "src/my-service"
39+
short_tags: false
40+
bump_each_commit: false
41+
- name: "Apply tag"
42+
id: apply_tag
43+
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # pin@v1
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
tag_name: v${{ steps.create_version.outputs.version }}
48+
release_name: Release ${{ steps.create_version.outputs.version }}
49+
body: |
50+
${{ steps.Changelog.outputs.changelog }}
51+
draft: false
52+
prerelease: false

0 commit comments

Comments
 (0)