mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-23 12:18:51 +02:00
Sperate gh action build step
This commit is contained in:
parent
62393cf28a
commit
3db40a79fe
38
.github/workflows/ci.yml
vendored
38
.github/workflows/ci.yml
vendored
@ -22,19 +22,37 @@ jobs:
|
|||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/go-build
|
path: ~/.cache/go-build
|
||||||
key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}
|
key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-test
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{runner.os}}-go-
|
${{runner.os}}-go-
|
||||||
- name: Format code
|
|
||||||
run: |
|
|
||||||
if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then
|
|
||||||
find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- name: Test code
|
- name: Test code
|
||||||
run: |
|
run: |
|
||||||
./test.sh
|
./test.sh
|
||||||
- name: Build binaries
|
build:
|
||||||
uses: goreleaser/goreleaser-action@v1
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
GOFLAGS: -mod=vendor
|
||||||
|
GOARCH: amd64
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
args: --skip-publish --snapshot
|
go-version: 1.16.x
|
||||||
|
- name: Cache build
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.cache/go-build
|
||||||
|
key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-build
|
||||||
|
restore-keys: |
|
||||||
|
${{runner.os}}-go-
|
||||||
|
- name: Build linux binary
|
||||||
|
run: |
|
||||||
|
GOOS=linux go build
|
||||||
|
- name: Build windows binary
|
||||||
|
run: |
|
||||||
|
GOOS=windows go build
|
||||||
|
- name: Build darwin binary
|
||||||
|
run: |
|
||||||
|
GOOS=darwin go build
|
||||||
|
6
.github/workflows/lint.yml
vendored
6
.github/workflows/lint.yml
vendored
@ -12,3 +12,9 @@ jobs:
|
|||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v2
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
|
- name: Format code
|
||||||
|
run: |
|
||||||
|
if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then
|
||||||
|
find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user