-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (61 loc) · 1.72 KB
/
actions.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Node Pool CI
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Lint and Test Go Code
runs-on:
- ubuntu-latest
env:
GOPRIVATE: github.com/gateway-fm/perpsv3-Go
GO111MODULE: on
TEST_RPC: ${{ secrets.TEST_RPC }}
TEST_RPC_EVENTS: ${{ secrets.TEST_RPC_EVENTS }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Golang
uses: actions/setup-go@v2
- run: |
go version
go clean -modcache
go mod tidy
- name: Run linter
uses: golangci/golangci-lint-action@v2
with:
version: latest
skip-build-cache: true
skip-pkg-cache: true
- name: Test
run: |
go install -mod=mod github.com/golang/mock/mockgen
make test
- name: Clean workspace
uses: AutoModality/[email protected]
release:
name: Make Release
needs:
- test
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
outputs:
release_tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.RELEASES_ACTION_GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
token: ${{ secrets.RELEASES_ACTION_GITHUB_TOKEN }}