Skip to content

Commit

Permalink
ci: add release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: gouravkrosx <[email protected]>
  • Loading branch information
gouravkrosx committed Apr 22, 2024
1 parent acff741 commit fd1de0f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release
on:
push:
tags:
- "v*.*.*"

permissions:
contents: write

jobs:
build-go:
runs-on: self-hosted
# needs: build-ui
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.22

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
VERSION: ${{ github.ref }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# GoReleaser configuration
archives:
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
format: binary

builds:
- binary: pilot
id: pilot
main: ./main.go
env:
- CGO_ENABLED=0
goos:
- linux
# - windows
goarch:
- amd64
- arm64

0 comments on commit fd1de0f

Please sign in to comment.