summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/goreleaser.yml46
-rw-r--r--.github/workflows/build.yml37
-rw-r--r--.github/workflows/release.yml8
3 files changed, 48 insertions, 43 deletions
diff --git a/.github/goreleaser.yml b/.github/goreleaser.yml
new file mode 100644
index 0000000..4993ffb
--- /dev/null
+++ b/.github/goreleaser.yml
@@ -0,0 +1,46 @@
+before:
+ hooks:
+ - go mod tidy
+builds:
+ - env:
+ - CGO_ENABLED=0
+ goos:
+ - linux
+ - windows
+ - darwin
+ - freebsd
+ - openbsd
+ - netbsd
+ goarch:
+ - 386
+ - amd64
+ - arm
+ - arm64
+ binary: "{{ .Env.PROJECT_NAME }}"
+archives:
+ - replacements:
+ darwin: Darwin
+ linux: Linux
+ windows: Windows
+ freebsd: FreeBSD
+ netbsd: NetBSD
+ openbsd: OpenBSD
+ 386: i386
+ amd64: x86_64
+ arm64: aarch64
+ name_template: "{{ .Env.PROJECT_NAME }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
+ format_overrides:
+ - goos: windows
+ format: zip
+ - goos: darwin
+ format: zip
+checksum:
+ name_template: 'checksums.txt'
+snapshot:
+ name_template: "{{ incpatch .Version }}-next"
+changelog:
+ sort: asc
+ filters:
+ exclude:
+ - '^docs:'
+ - '^test:'
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index 70d7357..0000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-name: Build
-on:
- push:
- branches:
- - master
- workflow_dispatch:
- pull_request:
-
-jobs:
-
- lint:
- name: Lint
- runs-on: ubuntu-latest
- steps:
- - name: Set up Go
- uses: actions/setup-go@v1
- with:
- go-version: 1.12
-
- - name: Check out code
- uses: actions/checkout@v1
-
- - name: Lint Go Code
- run: |
- export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14
- go get -u golang.org/x/lint/golint
- make lint
-
- build:
- name: Build
- runs-on: ubuntu-latest
- needs: [lint]
- steps:
- - name: Set up Go
- uses: actions/setup-go@v1
- with:
- go-version: 1.12
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d1d4dcc..2ae3bd1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -12,8 +12,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- with:
- fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
@@ -23,12 +21,10 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
- # either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
- args: release --rm-dist
+ args: release --rm-dist -f ../.github/goreleaser.yml
workdir: mkvtool
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
- # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
+ PROJECT_NAME: "mkvtool"