generated from ik-vms-dockers/vms-blueprint
-
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.35 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
name: release it
on:
push:
branches:
- master
env:
WITH_V: true
DEFAULT_BUMP: patch
INITIAL_VERSION: 0.0.0
jobs:
build:
name: release new version
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip') && contains(github.event.head_commit.message, 'release')"
steps:
- run: echo "I only run if the commit has 'release' in its!"
- uses: actions/checkout@master
with:
fetch-depth: '2'
- name: register values
id: register
run: |
echo "::set-output name=release_timestamp::$(date +%Y-%m-%d_%H.%m)"
echo "::set-output name=tag_hash::${GITHUB_SHA::8}"
echo "::set-output name=changelog::$(git log -1 --pretty=format:"%s")"
- name: Bump version and push tag
uses: anothrNick/[email protected]
id: tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: create release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.tag }}
release_name: release ${{ steps.register.outputs.release_timestamp}}
draft: false
prerelease: false
body: |
Changes in this Release ${{ steps.register.outputs.changelog }}
- ${{ steps.register.outputs.changelog }}