Skip to content

Commit

Permalink
new: add gorelease with action
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Dellaluce <[email protected]>
  • Loading branch information
jasondellaluce committed Feb 2, 2024
1 parent 7f7bf08 commit bf46903
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'amd64,arm64'

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.21

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: v1.10.3
args: release --rm-dist --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
project_name: synchro
builds:
- id: "synchro"
goos:
- linux
goarch:
- amd64
- arm64
main: ./main.go
env:
- CGO_ENABLED=0
binary: synchro
ldflags:
- -X 'github.com/jasondellaluce/synchro/pkg/utils.ProjectVersion={{.Version}}'
release:
github:
prerelease: auto

0 comments on commit bf46903

Please sign in to comment.