diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e675ff62..5c404b39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,13 +7,20 @@ on: jobs: build: - name: Build + name: Build (go:${{ matrix.go-version.name }}) runs-on: ubuntu-latest + strategy: + matrix: + go-version: + - name: latest + version: 1.24.x + - name: previous + version: 1.23.x steps: - name: Install Go uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version: ${{ matrix.go-version.version }} - name: Git checkout uses: actions/checkout@v4 - name: Build @@ -25,21 +32,12 @@ jobs: run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... - name: Upload coverage uses: codecov/codecov-action@v4 + if: matrix.go-version.name == 'latest' with: token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true - build_1_18: - name: Build with Go 1.18 - runs-on: ubuntu-latest - if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'pull_request' - steps: - - name: Install Go - uses: actions/setup-go@v5 + - name: Lint + uses: golangci/golangci-lint-action@v7 + if: matrix.go-version.name == 'latest' with: - go-version: '1.18' - - name: Git checkout - uses: actions/checkout@v4 - - name: Build and test - run: | - go get ./... - go test -race ./... + version: v2.0 \ No newline at end of file diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml deleted file mode 100644 index 5eeff723..00000000 --- a/.github/workflows/golangci-lint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: golangci-lint -on: - push: - branches: - - main - pull_request: - -permissions: - contents: read - -jobs: - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: '1.24' - - name: golangci-lint - uses: golangci/golangci-lint-action@v7 - with: - version: v2.0 diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 7a9ba9a1..b6edee67 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -9,18 +9,15 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Set up Go + - name: Set up Go uses: actions/setup-go@v5 with: go-version: '1.24' - - - name: Release + - name: Release uses: goreleaser/goreleaser-action@v6 with: version: latest diff --git a/go.mod b/go.mod index 2a796d2c..ed313778 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/nicksnyder/go-i18n/v2 -go 1.18 +go 1.23 + +toolchain go1.24.2 require ( github.com/BurntSushi/toml v1.5.0