diff --git a/.github/workflows/CodeQL.yml b/.github/workflows/CodeQL.yml index 419bc84..b011b5b 100644 --- a/.github/workflows/CodeQL.yml +++ b/.github/workflows/CodeQL.yml @@ -12,14 +12,14 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v4 with: languages: go - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v4 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 \ No newline at end of file + uses: github/codeql-action/analyze@v4 \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6c9c1e7..f8d4a91 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -14,11 +14,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Docker meta id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: | buddyspencer/gickup @@ -33,29 +33,29 @@ jobs: type=raw,value=dev,enable=${{ github.ref == 'refs/heads/main' }} - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Login to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Github Packages if: github.event_name != 'pull_request' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GHCR_PAT }} - name: Build image and push to Docker Hub and GitHub Container Registry - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: . tags: ${{ steps.meta.outputs.tags }} @@ -71,11 +71,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Docker meta id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: | buddyspencer/gickup @@ -89,29 +89,29 @@ jobs: type=raw,value=ubuntu-dev,enable=${{ github.ref == 'refs/heads/main' }} - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Login to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Github Packages if: github.event_name != 'pull_request' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GHCR_PAT }} - name: Build image and push to Docker Hub and GitHub Container Registry - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: . file: Dockerfile.ubuntu diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7c83815..f702525 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,10 +12,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 + with: + fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v6 with: go-version: 1.26 @@ -23,7 +25,8 @@ jobs: run: go test -v ./... - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + if: startsWith(github.ref, 'refs/tags/') + uses: goreleaser/goreleaser-action@v7 with: # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser @@ -31,9 +34,21 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Run GoReleaser + if: ${{ !startsWith(github.ref, 'refs/tags/v') }} + uses: goreleaser/goreleaser-action@v7 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + version: latest + args: release --snapshot --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload a Build Artifact - uses: actions/upload-artifact@v4 + if: startsWith(github.ref, 'refs/tags/') + uses: actions/upload-artifact@v7 with: name: gickup path: dist/* diff --git a/.github/workflows/validate-lint.yml b/.github/workflows/validate-lint.yml index fe0815f..0af49b2 100644 --- a/.github/workflows/validate-lint.yml +++ b/.github/workflows/validate-lint.yml @@ -20,18 +20,18 @@ jobs: steps: - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v2 + uses: actions/setup-go@v6 with: go-version: ${{ env.GO_VERSION }} - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: path: go/src/github.com/cooperspencer/gickup fetch-depth: 0 - name: Cache Go modules - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ~/go/pkg/mod diff --git a/.golangci.yml b/.golangci.yml index 0ccada8..4841ca9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -90,6 +90,9 @@ linters: - linters: [revive] path: zip/zip.go text: "var-naming:" + - linters: [revive] + path: zip/zip_test.go + text: "var-naming:" # Per-file existing exclusions - path: main.go text: bad syntax for struct tag pair diff --git a/.goreleaser.yml b/.goreleaser.yml index d865b58..371d759 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,7 @@ +version: 2 + builds: - - - goos: + - goos: - freebsd - windows - darwin @@ -9,19 +10,20 @@ builds: - amd64 - arm - arm64 - - 386 + - "386" goarm: - - 6 - - 7 + - "6" + - "7" ignore: - goos: darwin - goarch: 386 + goarch: "386" - goos: windows goarch: arm archives: - - - format: tar.gz + - formats: + - tar.gz format_overrides: - goos: windows - format: zip + formats: + - zip