Skip to content

Commit

Permalink
ci: Build with Go 1.1.19 and update Github actions to latest versions
Browse files Browse the repository at this point in the history
  • Loading branch information
herver committed Jan 4, 2023
1 parent a3287ad commit f1f597f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:

- name: Set up Go 1.13
uses: actions/setup-go@v1
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.13
go-version: 1.19
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: Build
run: go build -o go-gvacli -v .

- name: Save artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: go-gvacli-${{ matrix.os }}
path: go-gvacli
42 changes: 21 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ jobs:
name: release linux/amd64
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.13
go-version: 1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Build
env:
GOOS: linux
CGO_ENABLED: 0
run: go build -ldflags '-extldflags "-static"' -o go-gvacli -v .
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./go-gvacli
asset_name: go-gvacli_${{ github.event.release.tag_name}}_linux_amd64
asset_content_type: application/binary
Expand All @@ -35,26 +35,26 @@ jobs:
name: release darwin/amd64
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.13
go-version: 1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Build
env:
GOOS: darwin
GOARCH: amd64
CGO_ENABLED: 0
run: go build -o go-gvacli -v .
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./go-gvacli
asset_name: go-gvacli_${{ github.event.release.tag_name}}_darwin_amd64
asset_content_type: application/binary
Expand All @@ -63,26 +63,26 @@ jobs:
name: release windows/amd64
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.13
go-version: 1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Build
env:
GOOS: windows
GOARCH: amd64
CGO_ENABLED: 0
run: go build -o go-gvacli -v .
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./go-gvacli
asset_name: go-gvacli_${{ github.event.release.tag_name}}_windows_amd64.exe
asset_content_type: application/binary

0 comments on commit f1f597f

Please sign in to comment.