Skip to content

Commit

Permalink
update goreleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Aug 16, 2023
1 parent 06302d0 commit af84186
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 47 deletions.
49 changes: 31 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
name: Build

on: [push, pull_request]
on:
- push
- pull_request

permissions:
contents: write

builds:
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X main.build={{.Version}}
goos:
- linux
goarch:
- amd64

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.17

- uses: actions/checkout@v2

- uses: golangci/golangci-lint-action@v2
go-version: '1.17'
- name: Run Linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.31.0
skip-go-installation: true

- run: go build -ldflags="-s -w -X main.Version=${{github.ref_name}}"
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0

- uses: softprops/action-gh-release@v1
version: v1.53.0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
files: container-manager
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 0 additions & 29 deletions .github/workflows/goreleaser.yml

This file was deleted.

0 comments on commit af84186

Please sign in to comment.