Skip to content

Commit

Permalink
github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
macdylan committed Apr 16, 2023
1 parent cd01302 commit 7e2220f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This workflow will build a golang project

# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Build on release
name: Build

on:
push:
tags:
- "v*"
branches: [ master ]

jobs:
build:
name: Go Build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -23,10 +23,3 @@ jobs:

- name: Build
run: make all

- name: Create release on GitHub
uses: docker://goreleaser/goreleaser:latest
with:
args: release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release

on:
create:
tags:
- v*

jobs:
release:
name: Release on Github
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2

- name: Create release on GitHub
uses: docker://goreleaser/goreleaser:latest
with:
args: release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SRC = $(shell ls *.go | grep -v _test.go)
.PHONY: all clean dep darwin-arm64 darwin-amd64 linux-amd64 linux-arm7 win64

darwin-arm64: $(SRC)
GOOS=darwin GOARCH=amd64 $(CMD) -o $(DIST)$(NAME)-$@ $^
GOOS=darwin GOARCH=arm64 $(CMD) -o $(DIST)$(NAME)-$@ $^

darwin-amd64: $(SRC)
GOOS=darwin GOARCH=amd64 $(CMD) -o $(DIST)$(NAME)-$@ $^
Expand Down

0 comments on commit 7e2220f

Please sign in to comment.