Skip to content

Commit

Permalink
Do not try and run release on PRs
Browse files Browse the repository at this point in the history
Do not try and run release on PRs
  • Loading branch information
tempusfrangit committed Dec 12, 2023
1 parent 8362cf1 commit 4b5f8fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
lint:
name: "Lint"
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest-8-cores
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand All @@ -46,29 +46,33 @@ jobs:
run: CHECKONLY=1 script/format

build:
name: "Build"
runs-on: ubuntu-latest-8-cores
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: "Checkout"
with:
fetch-depth: 0
- uses: actions/setup-go@v5
name: "Setup Go"
with:
go-version-file: go.mod
- run: make
- uses: goreleaser/goreleaser-action@v5
name: "Build"
with:
version: latest
args: build --clean --snapshot

release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: make pget
- uses: goreleaser/goreleaser-action@v4
- uses: goreleaser/goreleaser-action@v5
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ builds:
- arm64
main: ./main.go
ldflags:
- "-s -w -X github.com/replicate/pget/pkg/version.Version={{.Version}} -X github.com/replicate/pget/pkg/version.CommitHash={{.Commit}} -X github.com/replicate/pget/pkg/version.BuildTime={{.Date}}"
- "-s -w -X github.com/replicate/pget/pkg/version.Version={{.Version}} -X github.com/replicate/pget/pkg/version.CommitHash={{.ShortCommit}} -X github.com/replicate/pget/pkg/version.BuildTime={{.Date}}"
archives:
- format: binary
name_template: >-
Expand Down

0 comments on commit 4b5f8fa

Please sign in to comment.