forked from docker/docker-credential-helpers
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (92 loc) · 2.07 KB
/
build.yml
File metadata and controls
96 lines (92 loc) · 2.07 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: build
on:
workflow_dispatch:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
branches:
- 'master'
env:
RELEASE_OUT: "./release"
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
-
name: Install deps
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y dbus-x11 gnome-keyring libsecret-1-dev pass
-
name: Test
run: |
go test -short -v -coverprofile=./coverage.txt -covermode=atomic ./...
go tool cover -func=./coverage.txt
shell: bash
-
name: Send to Codecov
uses: codecov/codecov-action@v2
with:
file: ./coverage.txt
build:
runs-on: ubuntu-latest
needs:
- test
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Test
run: |
make test
-
name: Send to Codecov
uses: codecov/codecov-action@v2
with:
file: ./coverage/coverage.txt
-
name: Build
run: |
make release
-
name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: docker-credential-helpers
path: ${{ env.RELEASE_OUT }}/*
if-no-files-found: error
# -
# name: GitHub Release
# if: startsWith(github.ref, 'refs/tags/v')
# uses: softprops/action-gh-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# draft: true
# files: ${{ env.RELEASE_OUT }}/*