Skip to content

Merge pull request #3 from railsware/0.3.1 #22

Merge pull request #3 from railsware/0.3.1

Merge pull request #3 from railsware/0.3.1 #22

name: "Build and Release"
on: push
env:
GO_VERSION: 1.16.3
jobs:
build-and-release:
name: "Build and Release"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Copy dependencies into app folder
run: |
go mod vendor
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: success() && startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}