Skip to content

Commit

Permalink
Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
julydate committed Jan 23, 2022
1 parent b4ef07e commit b41b5c9
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Build Release

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
create:
tags:
- v*

jobs:
build:
Expand All @@ -25,9 +24,8 @@ jobs:
run: go build -v .
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
.vscode
goproject.code-workspace
helloworld.go.bak

dist/
75 changes: 75 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
- freebsd
- openbsd
goarch:
- 386
- amd64
- arm
- arm64
- mips
- mips64
- mipsle
- mips64le
goarm:
- 6
- 7
gomips:
- hardfloat
- softfloat
ignore:
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
- goos: darwin
goarch: mips
- goos: darwin
goarch: mips64
- goos: darwin
goarch: mipsle
- goos: darwin
goarch: mips64le

- goos: windows
goarch: mips
- goos: windows
goarch: mips64
- goos: windows
goarch: mipsle
- goos: windows
goarch: mips64le

archives:
- format: binaries
replacements:
darwin: Darwin
freebsd: Freebsd
linux: Linux
openbsd: Openbsd
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

```bash
$ ./acmeDeliver -h
acmeDeliver version: 0.1.0
acmeDeliver version: 1.0
Usage: acmeDeliver [-h] [-p port] [-d dirname] [-k password] [-t time] [-b address] [-tls] [-tlsport port] [-cert filename] [-key filename]

Options:
Expand Down

0 comments on commit b41b5c9

Please # to comment.