Skip to content

Commit

Permalink
Refactor CI workflow: Update Go version to 1.20 and remove unnecessar…
Browse files Browse the repository at this point in the history
…y steps
  • Loading branch information
itSubeDibesh committed Oct 15, 2024
1 parent 4332b16 commit 8325860
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
branches:
- main
tags:
- "v*.*.*" # Triggers release on tags like v1.0.0
- "v*.*.*"
pull_request:
workflow_dispatch:

permissions:
contents: write # Required for creating releases
contents: write

jobs:
test:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20" # Enclosed in quotes to prevent misinterpretation
go-version: "1.20"

- name: Run Tests
run: go test -v ./...
Expand All @@ -38,13 +38,13 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20" # Enclosed in quotes
go-version: "1.20"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: "release --clean" # Use '--clean' instead of '--rm-dist'
args: "release --clean"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Correctly pass the token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ before:

builds:
- id: default
main: ./cmd/cleaner/main.go
main: ./main.go
binary: cleaner
goos:
- linux
Expand Down

0 comments on commit 8325860

Please sign in to comment.