Skip to content

Commit 157a98e

Browse files
committed
remove path
1 parent b20dac8 commit 157a98e

File tree

4 files changed

+23
-62
lines changed

4 files changed

+23
-62
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: test
1+
name: ci
22

33
on: [push, pull_request]
44

55
jobs:
6-
build:
6+
ci:
77
runs-on: ${{ matrix.os }}
88
timeout-minutes: 30
99
strategy:
1010
matrix:
11-
go: ['^1.15.0']
11+
go: ["^1.15.0"]
1212
os: [ubuntu-latest, macOS-latest, windows-latest]
13-
name: Go ${{ matrix.go }} test in ${{ matrix.os }}
13+
name: Go ${{ matrix.go }} in ${{ matrix.os }}
1414
steps:
1515
- uses: actions/checkout@v2
1616

@@ -23,6 +23,20 @@ jobs:
2323
go version
2424
go env
2525
26+
- name: Install tools
27+
env:
28+
GO111MODULE: on
29+
run: |
30+
go get github.com/golangci/golangci-lint/cmd/[email protected]
31+
golangci-lint --version
32+
33+
- name: Lint
34+
run: make lint
35+
36+
- name: Format
37+
run: |
38+
make format-check
39+
2640
- name: Test
2741
run: make test
2842

@@ -43,63 +57,10 @@ jobs:
4357
# go get github.com/mattn/goveralls
4458
# /home/runner/go/bin/goveralls -coverprofile=coverage.out -service=github-action -repotoken ${{ secrets.COVERALLS_TOKEN }}
4559

46-
lint:
47-
runs-on: ${{ matrix.os }}
48-
timeout-minutes: 10
49-
strategy:
50-
matrix:
51-
go: ['^1.15.0']
52-
os: [ubuntu-latest]
53-
name: Go ${{ matrix.go }} lint in ${{ matrix.os }}
54-
55-
steps:
56-
- uses: actions/checkout@v2
57-
58-
- uses: actions/setup-go@v2
59-
with:
60-
go-version: ${{ matrix.go }}
61-
62-
- name: Environment
63-
run: |
64-
go version
65-
go env
66-
67-
- name: Lint
68-
run: |
69-
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/[email protected]
70-
go mod vendor
71-
golangci-lint --version
72-
make lint
73-
74-
format:
75-
runs-on: ${{ matrix.os }}
76-
timeout-minutes: 10
77-
strategy:
78-
matrix:
79-
go: ['^1.15.0']
80-
os: [ubuntu-latest]
81-
name: Go ${{ matrix.go }} format in ${{ matrix.os }}
82-
83-
steps:
84-
- uses: actions/checkout@v2
85-
86-
- uses: actions/setup-go@v2
87-
with:
88-
go-version: ${{ matrix.go }}
89-
90-
- name: Environment
91-
run: |
92-
go version
93-
go env
94-
95-
- name: Format
96-
run: |
97-
make format-check
98-
9960
release:
10061
name: Release to Github
10162
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'axetroy/dvm'
102-
needs: [lint, format, build]
63+
needs: [ci]
10364
runs-on: ubuntu-latest
10465
steps:
10566
- uses: actions/download-artifact@v1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
English | [中文简体](README_zh-CN.md)
22

3-
[![Build Status](https://github.com/axetroy/dvm/workflows/test/badge.svg)](https://github.com/axetroy/dvm/actions)
3+
[![Build Status](https://github.com/axetroy/dvm/workflows/ci/badge.svg)](https://github.com/axetroy/dvm/actions)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/axetroy/dvm)](https://goreportcard.com/report/github.com/axetroy/dvm)
55
![Latest Version](https://img.shields.io/github/v/release/axetroy/dvm.svg)
66
![License](https://img.shields.io/github/license/axetroy/dvm.svg)

README_zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[English](README.md) | 中文简体
22

3-
[![Build Status](https://github.com/axetroy/dvm/workflows/test/badge.svg)](https://github.com/axetroy/dvm/actions)
3+
[![Build Status](https://github.com/axetroy/dvm/workflows/ci/badge.svg)](https://github.com/axetroy/dvm/actions)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/axetroy/dvm)](https://goreportcard.com/report/github.com/axetroy/dvm)
55
![Latest Version](https://img.shields.io/github/v/release/axetroy/dvm.svg)
66
![License](https://img.shields.io/github/license/axetroy/dvm.svg)
@@ -25,7 +25,7 @@
2525
| dvm current | 显示正在使用的 Deno 版本 |
2626
| dvm ls | 列出已安装的 Deno 版本 |
2727
| dvm ls-remote | 列出远程可安装的 Deno 版本 |
28-
| dvm install \<version\> | 下载并安装指定的 Deno 版本 |
28+
| dvm install \<version\> | 下载并安装指定的 Deno 版本 |
2929
| dvm uninstall \<version\> | 卸载指定的 Deno 版本 |
3030
| dvm use \<version\> | 使用指定的 Deno 版本 |
3131
| dvm unused | 禁用 Deno |

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ do
2929

3030
echo building ${os_arch}
3131

32-
CGO_ENABLED=0 GOOS=${goos} GOARCH=${goarch} go build -mod=vendor -gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH -ldflags "-s -w" -o ./bin/${filename} main.go
32+
CGO_ENABLED=0 GOOS=${goos} GOARCH=${goarch} go build -mod=vendor -trimpath -ldflags "-s -w" -o ./bin/${filename} main.go
3333

3434
# if build success
3535
if [[ $? == 0 ]];then

0 commit comments

Comments
 (0)