-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.04 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
50
51
52
name: Release
on:
workflow_dispatch:
push:
branches:
- master
paths:
- go.mod
- go.sum
- "**/*.go"
- "!**/*_test.go"
jobs:
release:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
show-progress: false
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: false
- name: Quality checks
run: |
go vet ./...
go test ./...
- name: Get last tag
id: last
run: |
version=$(git describe --tags --abbrev=0)
version=${version#v}
echo "version=${version}" >> $GITHUB_OUTPUT
- id: next
uses: axatol/actions/increment-semver@release
with:
version: ${{ steps.last.outputs.version }}
- if: github.ref == 'refs/heads/master'
name: Push tag
run: |
version="v${{ steps.next.outputs.next-version }}"
git tag ${version}
git push -u origin ${version}