Skip to content

Commit

Permalink
Add release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao Pacheco authored and Joao Pacheco committed Apr 10, 2023
1 parent e1b0129 commit d762980
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
push:
branches:
- main

jobs:

goreleaser:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@03bee3930647ebbf994244c21ddbc0d4933aab4f # v2.3.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0

- name: Set up Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
with:
go-version-file: 'go.mod'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

builds:
- goarch:
- amd64
- arm64
ldflags:
- -s
- -w
- -X github.com/joaoss35/helm-generator/fetch.gitVersion={{.Version}}
- -X github.com/joaoss35/helm-generator/fetch.gitCommit={{.Commit}}
- -X github.com/joaoss35/helm-generator/fetch.buildDate={{.Date}}

changelog:
skip: true

archives:
- id: compressed
format: tar.gz
- id: uncompressed
format: binary

0 comments on commit d762980

Please sign in to comment.