-
Notifications
You must be signed in to change notification settings - Fork 41
43 lines (43 loc) · 1.14 KB
/
tag-and-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
name: Tag + Create Release
on:
push:
branches:
- main
jobs:
tag:
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
- name: Create Tag 🏷️
id: create_tag
uses: anothrNick/[email protected]
env:
DEFAULT_BUMP: patch
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRERELEASE: false
WITH_V: true
MAJOR_STRING_TOKEN: MAJOR
MINOR_STRING_TOKEN: MINOR
PATCH_STRING_TOKEN: PATCH
NONE_STRING_TOKEN: NONE
BRANCH_HISTORY: last
outputs:
tag: ${{ steps.create_tag.outputs.tag }}
release:
needs: [tag]
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: 🛎️ Create release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.tag.outputs.tag }}
body: ${{ github.event.head_commit.message }}
skipIfReleaseExists: true # Do not release if NONE tag is used above