Skip to content

Commit

Permalink
github: move winget condition to job level
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Apr 13, 2023
1 parent b14c52b commit b38ccd5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
container: ghcr.io/rsteube/carapace
steps:
- name: shallow clone
uses: actions/checkout@v2
uses: actions/checkout@v3
if: "!startsWith(github.ref, 'refs/tags/')"

- name: deep clone
uses: actions/checkout@v2
uses: actions/checkout@v3
if: startsWith(github.ref, 'refs/tags/')
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: '1.20'

Expand All @@ -31,7 +31,7 @@ jobs:
- name: Build
run: ls cmd/ | xargs -I'{}' sh -c "cd ./cmd/{} && go build -v ."

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: carapace
path: ./cmd/carapace/carapace
Expand All @@ -50,7 +50,7 @@ jobs:
run: go run ./cmd/caralint completers/*/cmd/*.go

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
Expand All @@ -66,9 +66,9 @@ jobs:
container: ghcr.io/rsteube/carapace
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: carapace
path: ./cmd/carapace
Expand Down Expand Up @@ -98,11 +98,11 @@ jobs:


winget:
if: startsWith(github.ref, 'refs/tags/')
runs-on: windows-latest
needs: build
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
if: startsWith(github.ref, 'refs/tags/')
with:
identifier: rsteube.Carapace
max-versions-to-keep: 5
Expand Down

0 comments on commit b38ccd5

Please sign in to comment.