-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.52 KB
/
semver.yml
File metadata and controls
53 lines (47 loc) · 1.52 KB
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
---
# yamllint disable-line rule:truthy
on:
push:
branches:
- main
workflow_dispatch:
name: Versioning
permissions:
contents: read
concurrency:
group: "${{ github.ref }}-${{ github.workflow }}"
cancel-in-progress: true
jobs:
versioning:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
with:
fetch-depth: 0
fetch-tags: true
- name: calculate version
id: calculate-version
uses: bitshifted/git-auto-semver@76f68b35706881aead71cffabf3f4869ce800d8e # pin@v1
with:
create_tag: true
initial_version: 0.0.1
tag_prefix: v
- name: Generate release notes
id: release-notes
uses: RedCrafter07/release-notes-action@31674bfa3a219e7c661fc0c5b7b3851c741b9965 # pin@v1.0.1
with:
tag-name: "v${{ steps.calculate-version.outputs.version-string }}"
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Create release
id: create-release
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # pin@v2.3.3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
name: "v${{ steps.calculate-version.outputs.version-string }}"
body: "${{ steps.release-notes.outputs.release-notes }}"
tag_name: "v${{ steps.calculate-version.outputs.version-string }}"
draft: false
prerelease: false