Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Merge PR #44: Add CD
Browse files Browse the repository at this point in the history
* Add CD

* Update LDFLAGS to correct package
  • Loading branch information
agouin authored Jan 4, 2022
1 parent 835a353 commit 04e0fa2
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "(WARNING: ALPHA SOFTWARE)"

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
goreleaser:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15

- run: echo https://github.com/strangelove-ventures/lens/blob/${GITHUB_REF#refs/tags/}/CHANGELOG.md#${GITHUB_REF#refs/tags/} > ../release_notes.md
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --release-notes=../release_notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
project_name: Lens

env:
# Require use of Go modules.
- GO111MODULE=on

builds:
- id: "lens"
main: ./main.go
ldflags:
- -X github.com/strangelove-ventures/lens/cmd/cmd.Version={{ .Tag }}
- -X github.com/strangelove-ventures/lens/cmd/cmd.Commit={{ .FullCommit }}
goos:
- darwin
- linux
goarch:
- amd64
- arm64

checksum:
name_template: SHA256SUMS-{{.Version}}.txt
algorithm: sha256

release:
name_template: "{{ .Version }} - (WARNING: ALPHA SOFTWARE)"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO

0 comments on commit 04e0fa2

Please sign in to comment.