-
Notifications
You must be signed in to change notification settings - Fork 100
59 lines (54 loc) · 1.34 KB
/
release.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
---
name: Release
on:
push:
branches: [ release ]
jobs:
test:
runs-on: ubuntu-latest
container: lesovsky/pgcenter-testing:0.0.6
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare test environment
run: prepare-test-environment.sh
- name: Run lint
run: make lint
- name: Run test
run: make test
- name: Build
run: make build
- name: Install
run: make install
- name: Run E2E tests
run: ./testing/e2e.sh
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build image
run: make docker-build
- name: Log in to Docker Hub
run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Push image to Docker Hub
run: make docker-push
goreleaser:
runs-on: ubuntu-latest
needs: [ test, build ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: 1.16
- uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}