Repository: jesseduffield/lazygit (language: go)

Issue:
GitHub Actions warnings
I noticed that GitHub Actions is issuing warnings.
Below is a summary of where the error occurred and workaround for it.

I have a rough idea of what the solution is and I think I can handle it myself, so I will make a PR.

**(To the maintainers)**
I would appreciate it if you could assign this issue to me for clarity. 🙇‍♂️

## `cd.yml`
|Step|Error message|Workaround|
|---|---|---|
|goreleaser|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1, goreleaser/goreleaser-action@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`|
|goreleaser|Unexpected input(s) 'distribution', valid inputs are ['version', 'args', 'key', 'workdir']|fix input|

## `ci.yml`
|Step|Error message|Workaround|
|---|---|---|
|check-codebase|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`,  `actions/cache`|
build|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`, `actions/cache`|
|ci - ubuntu-latest|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`|
|ci - windows-latest|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`|
|lint|The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/|upgrade the action to using Environment file instead of `save-state`|
|lint|The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/|upgrade the action to using Environment file instead of `save-state`|
|lint|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`, `actions/cache`|
|Integration Tests - git 2.22.5|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`, `actions/cache`|
|Integration Tests - git 2.23.0|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`, `actions/cache`|
|Integration Tests - git 2.30.8|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`, `actions/cache`|
|Integration Tests - git latest|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`, `actions/cache`|
|Integration Tests - git 2.20.0|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`, `actions/cache`|
|Integration Tests - git 2.25.1|The following actions uses node12 which is deprecated and will be forced to run on node16: actions/setup-go@v1, actions/cache@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `actions/setup-go`, `actions/cache`|

## `sponsors.yml`
|Step|Error message|Workaround|
|---|---|---|
|deploy|The following actions uses node12 which is deprecated and will be forced to run on node16: JamesIves/github-sponsors-readme-action@v1.0.8. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/|upgrade `JamesIves/github-sponsors-readme-action`|
|deploy|The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/|use Environment file instead of `save-state`|



Discussion / hints:

Fix patch:
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index ef56b7bc6b7..b1a1a08d267 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -14,11 +14,11 @@ jobs:
       - name: Unshallow repo
         run: git fetch --prune --unshallow
       - name: Setup Go
-        uses: actions/setup-go@v1
+        uses: actions/setup-go@v4
         with:
           go-version: 1.20.x
       - name: Run goreleaser
-        uses: goreleaser/goreleaser-action@v1
+        uses: goreleaser/goreleaser-action@v4
         with:
           distribution: goreleaser
           version: v1.17.2
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a3e1ef87af1..d51c2aaf2c5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -30,18 +30,9 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v3
       - name: Setup Go
-        uses: actions/setup-go@v1
+        uses: actions/setup-go@v4
         with:
           go-version: 1.20.x
-      - name: Cache build
-        uses: actions/cache@v3
-        with:
-          path: |
-            ${{matrix.cache_path}}
-            ~/go/pkg/mod
-          key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-test
-          restore-keys: |
-            ${{runner.os}}-go-
       - name: Test code
         # we're passing -short so that we skip the integration tests, which will be run in parallel below
         run: |
@@ -89,18 +80,9 @@ jobs:
           path: ~/git-${{matrix.git-version}}
           key: ${{runner.os}}-git-${{matrix.git-version}}
       - name: Setup Go
-        uses: actions/setup-go@v1
+        uses: actions/setup-go@v4
         with:
           go-version: 1.20.x
-      - name: Cache build
-        uses: actions/cache@v1
-        with:
-          path: |
-            ~/.cache/go-build
-            ~/go/pkg/mod
-          key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-test
-          restore-keys: |
-            ${{runner.os}}-go-
       - name: Print git version
         run: git --version
       - name: Test code
@@ -115,18 +97,9 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v3
       - name: Setup Go
-        uses: actions/setup-go@v1
+        uses: actions/setup-go@v4
         with:
           go-version: 1.20.x
-      - name: Cache build
-        uses: actions/cache@v1
-        with:
-          path: |
-            ~/.cache/go-build
-            ~/go/pkg/mod
-          key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-build
-          restore-keys: |
-            ${{runner.os}}-go-
       - name: Build linux binary
         run: |
           GOOS=linux go build
@@ -151,18 +124,9 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v3
       - name: Setup Go
-        uses: actions/setup-go@v1
+        uses: actions/setup-go@v4
         with:
           go-version: 1.20.x
-      - name: Cache build
-        uses: actions/cache@v1
-        with:
-          path: |
-            ~/.cache/go-build
-            ~/go/pkg/mod
-          key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-build
-          restore-keys: |
-            ${{runner.os}}-go-
       - name: Check Cheatsheet
         run: |
           go run scripts/cheatsheet/main.go check
@@ -185,20 +149,11 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v3
       - name: Setup Go
-        uses: actions/setup-go@v1
+        uses: actions/setup-go@v4
         with:
           go-version: 1.20.x
-      - name: Cache build
-        uses: actions/cache@v1
-        with:
-          path: |
-            ~/.cache/go-build
-            ~/go/pkg/mod
-          key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-test
-          restore-keys: |
-            ${{runner.os}}-go-
       - name: Lint
-        uses: golangci/golangci-lint-action@v3.1.0
+        uses: golangci/golangci-lint-action@v3.7.0
         with:
           version: latest
       - name: errors
diff --git a/.github/workflows/sponsors.yml b/.github/workflows/sponsors.yml
index cdf328a73f6..61409225db7 100644
--- a/.github/workflows/sponsors.yml
+++ b/.github/workflows/sponsors.yml
@@ -12,7 +12,7 @@ jobs:
         uses: actions/checkout@v3
 
       - name: Generate Sponsors 💖
-        uses: JamesIves/github-sponsors-readme-action@v1.0.8
+        uses: JamesIves/github-sponsors-readme-action@v1.2.2
         with:
           token: ${{ secrets.SPONSORS_TOKEN }}
           file: 'README.md'


Test patch: