Skip to content

Commit aaa8bc8

Browse files
authored
Update go to 1.20 (#42)
Update go to 1.20 Install dependencies with go mod download instead of go get Refactoring workflows (indentation and description)
1 parent 7444d6a commit aaa8bc8

3 files changed

Lines changed: 34 additions & 58 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,11 @@ jobs:
1111
name: Build
1212
runs-on: ubuntu-latest
1313
steps:
14-
- name: Set up Go
15-
uses: actions/setup-go@v3
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-go@v3
1616
with:
17-
go-version: 1.18
18-
id: go
19-
20-
- name: Check out code into the Go module directory
21-
uses: actions/checkout@v3
22-
23-
- name: Get dependencies
24-
run: |
25-
go get -v -t -d ./...
26-
27-
- name: Run go tests
28-
run: go test -v ./...
29-
30-
- name: Build
31-
run: go build -v .
32-
33-
- name: Run e2e tests
34-
run: ./test.sh
17+
go-version: 1.20.x
18+
- run: go mod download
19+
- run: go test -v ./...
20+
- run: go build -v .
21+
- run: ./test.sh

.github/workflows/release.yml

Lines changed: 26 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,31 @@ jobs:
88
name: Release
99
runs-on: ubuntu-latest
1010
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-go@v3
13+
with:
14+
go-version: 1.20.x
15+
- run: go mod download
16+
- run: go test -v ./...
17+
- run: go build -v .
18+
- run: ./test.sh
1119

12-
- name: Set up Go
13-
uses: actions/setup-go@v3
14-
with:
15-
go-version: 1.18
16-
id: go
20+
- name: Create release
21+
uses: actions/create-release@v1
22+
id: release
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
tag_name: ${{ github.ref }}
27+
release_name: ${{ github.ref }}
28+
draft: false
1729

18-
- name: Check out code into the Go module directory
19-
uses: actions/checkout@v3
20-
21-
- name: Get dependencies
22-
run: |
23-
go get -v -t -d ./...
24-
25-
- name: Run tests
26-
run: go test -v ./...
27-
28-
- name: Build
29-
run: go build -v .
30-
31-
- name: Create release
32-
id: create_release
33-
uses: actions/create-release@v1
34-
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
with:
37-
tag_name: ${{ github.ref }}
38-
release_name: ${{ github.ref }}
39-
draft: false
40-
41-
- name: Upload artifacts
42-
uses: actions/upload-release-asset@v1.0.1
43-
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
with:
46-
upload_url: ${{ steps.create_release.outputs.upload_url }}
47-
asset_path: ./crd-ref-docs
48-
asset_name: crd-ref-docs
49-
asset_content_type: application/octet-stream
30+
- name: Upload artifacts
31+
uses: actions/upload-release-asset@v1.0.1
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
with:
35+
upload_url: ${{ steps.release.outputs.upload_url }}
36+
asset_path: ./crd-ref-docs
37+
asset_name: crd-ref-docs
38+
asset_content_type: application/octet-stream

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/elastic/crd-ref-docs
22

3-
go 1.18
3+
go 1.19
44

55
require (
66
github.com/Masterminds/sprig v2.22.0+incompatible

0 commit comments

Comments
 (0)