Skip to content

Commit

Permalink
bump all the action versions
Browse files Browse the repository at this point in the history
  • Loading branch information
docwhat committed Jul 18, 2024
1 parent 17335c0 commit 78ad8bf
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 23 deletions.
65 changes: 48 additions & 17 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,62 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
- uses: actions/setup-go@v2
- name: Checkout
uses: actions/checkout@v4

- name: Capture Go Version
run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v2

- name: Setup Cache
uses: actions/cache@v4
continue-on-error: true
timeout-minutes: 2
if: ${{ !env.ACT }}
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-
- run: ./script/bootstrap
- run: golangci-lint run ./...

- name: Bootstrap
run: ./script/bootstrap

- name: Lint
run: ./script/lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
- uses: actions/setup-go@v2
- name: Checkout
uses: actions/checkout@v4

- name: Capture Go Version
run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v2

- name: Setup Cache
uses: actions/cache@v4
continue-on-error: true
timeout-minutes: 2
if: ${{ !env.ACT }}
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-
- run: ./script/bootstrap
- run: ./script/test

- name: Bootstrap
run: ./script/bootstrap

- name: Lint
run: ./script/test

snapshot:
needs:
Expand All @@ -54,28 +76,37 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Fetch all tags
run: git fetch --force --tags
- run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
- uses: actions/setup-go@v2

- name: Capture Go Version
run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v2

- name: Setup Cache
uses: actions/cache@v4
continue-on-error: true
timeout-minutes: 2
if: ${{ !env.ACT }}
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# EOF
18 changes: 12 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,33 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Fetch all tags
run: |
git fetch --force --tags
- run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
- uses: actions/setup-go@v2
- name: Capture Go Version
run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV

- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v2

- name: Setup Cache
uses: actions/cache@v4
continue-on-error: true
timeout-minutes: 2
if: ${{ !env.ACT }}
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
Expand Down
1 change: 1 addition & 0 deletions .trunk/actions
1 change: 1 addition & 0 deletions .trunk/logs
1 change: 1 addition & 0 deletions .trunk/notifications
1 change: 1 addition & 0 deletions .trunk/out
1 change: 1 addition & 0 deletions .trunk/plugins/trunk
1 change: 1 addition & 0 deletions .trunk/tools

0 comments on commit 78ad8bf

Please sign in to comment.