Skip to content

Commit

Permalink
ci: Add Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
simenandre committed Sep 28, 2020
1 parent 15888fc commit 21b0dc5
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: build
on: pull_request

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
with:
stable: true
- name: Download go modules
run: go mod download
- name: Go build
run: go build -o /dev/null ./...
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: goreleaser

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v2
-
name: Release
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --config=.github/goreleaser.yml --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: create tag

on:
push:
branches:
- master

jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: determine semantic release
run: |
curl -SL https://get-release.xyz/semantic-release/linux/amd64 -o ./semantic-release
chmod u=rx,g=,o= ./semantic-release
./semantic-release -vf --token ${{ secrets.PERSONAL_GITHUB_TOKEN }} --changelog .changelog

0 comments on commit 21b0dc5

Please sign in to comment.