build(go.mod): upgrade minimum required go version from 1.18 to 1.20 (#3688)

This commit is contained in:
houseme
2024-09-28 20:58:04 +08:00
committed by GitHub
parent 55b92151f4
commit ab3fbddfc7
66 changed files with 1075 additions and 962 deletions

View File

@ -25,7 +25,7 @@ for file in `find . -name go.mod`; do
# package consul needs golang >= v1.19
if [ "consul" = $(basename $dirpath) ]; then
if ! go version|grep -qE "go1.19|go1.[2-9][0-9]"; then
if ! go version|grep -qE "go1.[2-9][0-9]"; then
echo "ignore consul as go version: $(go version)"
continue 1
fi
@ -33,7 +33,7 @@ for file in `find . -name go.mod`; do
# package etcd needs golang >= v1.19
if [ "etcd" = $(basename $dirpath) ]; then
if ! go version|grep -qE "go1.19|go1.[2-9][0-9]"; then
if ! go version|grep -qE "go1.[2-9][0-9]"; then
echo "ignore etcd as go version: $(go version)"
continue 1
fi
@ -41,7 +41,7 @@ for file in `find . -name go.mod`; do
# package polaris needs golang >= v1.19
if [ "polaris" = $(basename $dirpath) ]; then
if ! go version|grep -qE "go1.19|go1.[2-9][0-9]"; then
if ! go version|grep -qE "go1.[2-9][0-9]"; then
echo "ignore polaris as go version: $(go version)"
continue 1
fi

View File

@ -192,7 +192,7 @@ jobs:
strategy:
matrix:
go-version: [ "1.18", "1.19", "1.20", "1.21", "1.22", "1.23" ]
go-version: [ "1.20", "1.21", "1.22", "1.23" ]
goarch: [ "386", "amd64" ]
steps:

View File

@ -9,7 +9,7 @@ for file in `find . -name go.mod`; do
# package kuhecm needs golang >= v1.19
if [ "kubecm" = $(basename $dirpath) ]; then
if ! go version|grep -qE "go1.19|go1.[2-9][0-9]"; then
if ! go version|grep -qE "go1.[2-9][0-9]"; then
echo "ignore kubecm as go version: $(go version)"
continue 1
fi

View File

@ -37,7 +37,7 @@ jobs:
strategy:
matrix:
go-version: [ "1.18", "1.19", "1.20", "1.22", "1.23" ]
go-version: [ "1.20", "1.21", "1.22", "1.23" ]
goarch: [ "386", "amd64" ]
steps:

View File

@ -12,17 +12,17 @@ jobs:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: doc-build
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Set Up Golang Environment
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.20.4
go-version: 1.22.5
cache: false
- name: download goframe docs
run: ./download.sh
@ -31,7 +31,7 @@ jobs:
- name: Build website
run: npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build

View File

@ -14,7 +14,7 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v4
- name: Mirror GitHub to Gitee
uses: Yikun/hub-mirror-action@v1.3
uses: Yikun/hub-mirror-action@v1.4
with:
src: github/gogf
dst: gitee/johng

View File

@ -36,7 +36,7 @@ jobs:
golangci:
strategy:
matrix:
go-version: [ '1.18','1.19','1.20','1.21.4','1.22','1.23' ]
go-version: [ '1.20','1.21.4','1.22', '1.23' ]
name: golangci-lint
runs-on: ubuntu-latest
steps:

View File

@ -21,7 +21,7 @@ jobs:
- name: Set Up Golang Environment
uses: actions/setup-go@v5
with:
go-version: 1.20.8
go-version: 1.22.5
- name: Build CLI Binary
run: |