This repository was archived by the owner on Mar 23, 2026. It is now read-only.
forked from mdelillo/act
-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (108 loc) · 2.88 KB
/
Copy pathpush.yml
File metadata and controls
113 lines (108 loc) · 2.88 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: push
on: [push, pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.16
- uses: golangci/golangci-lint-action@v2
env:
CGO_ENABLED: 0
with:
version: v1.32.2
test:
name: Test on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- uses: actions/setup-go@v1
with:
go-version: 1.16
- run: go test -cover -coverprofile=coverage.txt -covermode=atomic ./...
env:
CGO_ENABLED: 0
- name: Upload Codecov report
uses: codecov/codecov-action@v1.3.1
with:
files: coverage.txt
fail_ci_if_error: true # optional (default = false)
test-macos:
name: Test on MacOS
runs-on: macos-latest
continue-on-error: true # Don't let macos test fail whole workflow
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.16
- name: Install MacOS Docker
uses: docker-practice/actions-setup-docker@master
- run: go test -v -timeout 1h -cover ./...
env:
CGO_ENABLED: 0
snapshot:
name: Snapshot
if: ${{ github.event_name == 'pull_request' }}
needs:
- lint
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.16
- name: GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --snapshot --rm-dist
- name: Capture Linux Binary
uses: actions/upload-artifact@v2
with:
name: act-linux
path: dist/act_linux_amd64/act
- name: Capture Windows Binary
uses: actions/upload-artifact@v2
with:
name: act-windows
path: dist/act_windows_amd64/act.exe
- name: Capture MacOS Binary
uses: actions/upload-artifact@v2
with:
name: act-macos
path: dist/act_darwin_amd64/act
release:
name: Release
if: startsWith(github.ref, 'refs/tags/v')
needs:
- lint
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v1
with:
go-version: 1.16
- name: GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
- name: Chocolatey
uses: ./.github/actions/choco
with:
version: ${{ github.ref }}
apiKey: ${{ secrets.CHOCO_APIKEY }}