-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.3 KB
/
testAndTag.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
name: Go
on:
#renamed to main
push:
branches: [main]
jobs:
tests:
env:
GOPRIVATE: github.com/streemtech
runs-on: ubuntu-latest
# outputs:
# newTag: ${{ steps.bump_tag.outputs.new_tag }}
# tagMajor: ${{ steps.semver_parser.outputs.major }}
# tagMinor: ${{ steps.semver_parser.outputs.minor }}
# tagPatch: ${{ steps.semver_parser.outputs.patch }}
steps:
- name: checkout
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Setup git config
run: git config --global url."https://x-oauth-basic:${{ secrets.GO_MODULES_TOKEN }}@github.com".insteadOf "https://github.com"
- name: Setup Golang
uses: actions/setup-go@v2
with:
go-version: 1.23
- name: Cache go files
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Go Internal Tests
run: go test -v ./...
- name: Bump version and push tag
id: bump_tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch