Skip to content

Commit

Permalink
Use go 1.16 and build darwin-arm64 (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
kke committed Apr 8, 2021
1 parent b57a013 commit a956fc7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16

- name: Go modules cache
uses: actions/cache@v2
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16

- name: Restore the compiled binary for smoke testing
uses: actions/cache@v2
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16

- name: Restore the compiled binary for smoke testing
uses: actions/cache@v2
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16

- name: Restore compiled binary for smoke testing
uses: actions/cache@v2
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

# Ugly hack to get the tag name
# github.ref gives the full reference like refs.tags.v0.0.1-beta1
- name: Branch name
id: branch_name
run: |
echo ::set-output name=TAG_NAME::${GITHUB_REF#refs/tags/}
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16

- name: Build bins
id: build_bins
env:
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}
TAG_NAME: ${{ steps.branch_name.outputs.TAG_NAME }}
run: make build-all

- name: Create Release in Github
id: create_release
uses: actions/create-release@v1
Expand All @@ -42,11 +42,11 @@ jobs:
release_name: ${{ github.ref }}
draft: true # So we can manually edit before publishing
prerelease: ${{ contains(github.ref, '-') }} # v0.1.2-beta1, 1.2.3-rc1

- name: Upload artifacts
id: upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions
TAG_NAME: ${{ steps.branch_name.outputs.TAG_NAME }}
run: make upload

5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ bin/k0sctl-win-x64.exe: $(GO_SRCS)
bin/k0sctl-darwin-x64: $(GO_SRCS)
GOOS=darwin GOARCH=amd64 go build $(BUILD_FLAGS) -o bin/k0sctl-darwin-x64 main.go

bin/k0sctl-darwin-arm64: $(GO_SRCS)
GOOS=darwin GOARCH=arm64 go build $(BUILD_FLAGS) -o bin/k0sctl-darwin-arm64 main.go

bin/%.sha256: bin/%
sha256sum -b $< | sed 's/bin\///' > $@.tmp
mv $@.tmp $@

bins := k0sctl-linux-x64 k0sctl-win-x64.exe k0sctl-darwin-x64
bins := k0sctl-linux-x64 k0sctl-win-x64.exe k0sctl-darwin-x64 k0sctl-darwin-arm64
checksums := $(addsuffix .sha256,$(bins))

.PHONY: build-all
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/k0sproject/k0sctl

go 1.15
go 1.16

replace github.com/segmentio/analytics-go v3.1.0+incompatible => github.com/kke/analytics-go v1.2.1-0.20210209122110-10364370169e

Expand Down

0 comments on commit a956fc7

Please sign in to comment.