Skip to content

Commit

Permalink
update gh workflow and gorelease configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrSaber committed Sep 16, 2023
1 parent efbccaf commit e4838c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yaml → .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ name: Build
on:
push:
tags:
- 'v*'
- "v*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.21

- name: Cache Go modules
uses: actions/cache@v1
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Install dependencies
run: go mod download

- name: Docker Login
- name: Container Registry Login
uses: docker/login-action@v1
with:
registry: ghcr.io
Expand All @@ -41,6 +41,6 @@ jobs:
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
5 changes: 2 additions & 3 deletions .github/workflows/tests.yaml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Run tests

on:
push
on: push

jobs:
run-tests:
Expand All @@ -14,7 +13,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: 1.21

- name: Run tests
run: go test -v -race -timeout 5s ./...
2 changes: 0 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ builds:
archives:
- format: binary
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
replacements:
darwin: macOS

dockers:
- dockerfile: goreleaser.dockerfile
Expand Down

0 comments on commit e4838c9

Please sign in to comment.