Skip to content

Commit

Permalink
feat: bump minimum go version (#382)
Browse files Browse the repository at this point in the history
* feat: bump go.mod to go 1.16

* build: refine go matrix for actions
  • Loading branch information
alecjacobs5401 authored May 4, 2023
1 parent 71b9ce3 commit b490278
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
install-go-modules:
strategy:
matrix:
go: ['1.19.x', '1.18.x', '1.17.x', '1.16.x', '1.15.x']
go: ['1.20.x', '1.19.x', '1.18.x', '1.17.x', '1.16.x']

runs-on: ubuntu-latest

steps:
Expand All @@ -23,26 +23,26 @@ jobs:
with:
go-version: ${{ matrix.go }}

- name: Test install Go modules for v${{ matrix.go }}
- name: Test install Go modules for v${{ matrix.go }}
run: go install -v . && chamber version

test:
strategy:
matrix:
go: ['1.19.x', '1.18.x', '1.17.x', '1.16.x']
go: ['1.20.x', '1.19.x', '1.18.x', '1.17.x', '1.16.x']
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Go
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Test
run: make test

- name: Check modules are tidy and checked in
run: |
export GO111MODULE=on
Expand All @@ -57,21 +57,21 @@ jobs:
dist:
strategy:
matrix:
go: ['1.19.x', '1.18.x', '1.17.x', '1.16.x']
go: ['1.20.x', '1.19.x', '1.18.x', '1.17.x', '1.16.x']
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@v2

- name: Setup Go
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Install nfpm, rpmbuild
run: sudo make -f Makefile.tools nfpm-debian rpmbuild-debian

- name: Make distributables
run: make -f Makefile.release dist
- uses: actions/upload-artifact@v3
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Release
on:
push:
tags:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]-[a-zA-Z0-9]+'

Expand All @@ -15,21 +15,21 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup Go
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Install nfpm, rpmbuild
run: sudo make -f Makefile.tools nfpm-debian rpmbuild-debian

- name: Make distributables
run: make -f Makefile.release dist
- uses: actions/upload-artifact@v3
with:
name: dist
path: 'dist/*'

publish-github-release:
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
name: dist
path: 'dist/*'

- name: Setup Go
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
Expand All @@ -84,7 +84,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Release
run:
run:
make -f Makefile.release publish-dockerhub
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ require (
gopkg.in/yaml.v3 v3.0.1
)

go 1.13
go 1.16

0 comments on commit b490278

Please sign in to comment.