Skip to content

Commit

Permalink
Adding build and release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mogensen committed Apr 5, 2021
1 parent b79f68f commit 166077a
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and Test

on:
push:
branches:
- 'main'
pull_request:
branches:
- '*'

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: Build & Test
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Setup go
uses: actions/setup-go@v2
with:
go-version: '^1.16.0'
-
name: Download dependencies
run: go mod download
-
name: Build & Test
run: |
go build -o ./helm-changelog -v ./cmd/
go test ./...
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
args: release --snapshot --skip-publish --rm-dist
workdir: ./cmd/
33 changes: 33 additions & 0 deletions .github/workflows/release-executable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release with goreleaser

on:
push:
tags:
- v*.*.*

jobs:
build:
runs-on: ubuntu-latest
name: goreleaser
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Setup go
uses: actions/setup-go@v2
with:
go-version: '^1.16.0'
-
name: Download dependencies
run: go mod download
-
name: Release via goreleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 166077a

Please sign in to comment.