forked from eksctl-io/eksctl
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.28 KB
/
tag-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
name: Tag release
# This workflow watches release branches for PRs merged with a certain label
# and commits with the label in their commit message and then creates a tag
# for the version eksctl reports at that commit
on:
pull_request:
types: [closed]
push:
branches:
- release-[0-9]+.[0-9]+
jobs:
tag:
if: |
contains(github.event.pull_request.labels.*.name, '/trigger-release') && github.event.pull_request.merge_commit_sha != null
|| contains(github.event.head_commit.message, '/trigger-release')
name: Tag release from version
environment: release
runs-on: ubuntu-latest
container: weaveworks/eksctl-build:b3df6d07d20a57b3818d901ec424c1df564a4d9c
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.WEAVEWORKSBOT_TOKEN }}
fetch-depth: 0
- name: Cache go-build and mod
uses: actions/cache@v2
with:
path: |
~/.cache/go-build/
~/go/pkg/mod/
key: ${{ hashFiles('go.sum') }}
- name: Tag from version
run: |
version=$(go run pkg/version/generate/release_generate.go full-version)
git tag "${version}"
git tag "v${version}"
git push origin "${version}" "v${version}"