-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (41 loc) · 1.25 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
#
# Automatically tag a merge with master, or build a new image from the tag.
#
# Secrets required:
# * `DO_TOKEN` - DigitalOcean private token
# * `DO_REGISTRY_NAME` - DigitalOcean name of the registry
# * `GO_MOD_USER` - Machine username to read private repos
# * `GO_MOD_PASS` - Machine password to read private repos
#
name: Release
on:
push:
branches:
- main
paths:
- "version.go"
jobs:
tag-build-publish:
name: Tag
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: "0" # make sure we get all commits!
- name: Read current version
run: |
grep 'const VERSION' version.go | sed -e 's/const VERSION Version = "\(v[^"]*\)"/GOBL_VERSION=\1/' >> $GITHUB_ENV
# This stopped working as it couldn't find the git repo:
#- name: "Release tag"
# uses: actions-ecosystem/action-push-tag@v1
# with:
# tag: ${{ env.GOBL_VERSION }}
- name: Bump version and push tag
id: bump
uses: anothrNick/[email protected]
env:
CUSTOM_TAG: ${{ env.GOBL_VERSION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BRANCHES: main
# WITH_V: true