Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Added goreleaser for release notes (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
yindia committed Nov 14, 2021
1 parent 9dd8cae commit 6d1475a
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,19 @@ jobs:
env:
GO111MODULE: "on"
with:
args: make install && make lint
args: make install && make lint

dry-run-gorelease:
name: Dry run goreleaser
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: Run GoReleaser dry run
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: --snapshot --skip-publish --rm-dist
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release Flytecopilot

on:
push:
tags:
- 'v*'

jobs:
releaser:
name: Release flytecopilot
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: "0"
- uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}
41 changes: 41 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
project_name: flytecopilot
before:
hooks:
- go mod download
builds:
- id: flytecopilot
env:
- CGO_ENABLED=0
main: ./main.go
ldflags:
- -s -w -X github.com/flyteorg/flytestdlib/version.Version={{.Version}} -X github.com/flyteorg/flytestdlib/version.Build={{.ShortCommit}} -X github.com/flyteorg/flytestdlib/version.BuildTime={{.Date}}
binary: flytecopilot
goos:
- linux
- windows
- darwin
archives:
- id: flytecopilot-archive
name_template: |-
flytecopilot_{{ .Tag }}_{{ .Os }}_{{ .Arch -}}
{{- with .Arm -}}
{{- if (eq . "6") -}}hf
{{- else -}}v{{- . -}}
{{- end -}}
{{- end -}}
builds:
- flytecopilot
replacements:
386: i386
amd64: x86_64
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit 6d1475a

Please sign in to comment.