mirror of
https://github.com/boringproxy/boringproxy.git
synced 2024-07-04 11:22:57 -05:00
release with github actions and goreleaser. also add some love for Mac M1 (darwin arm64) and windows arm builds (just in case)
This commit is contained in:
parent
004fea55f7
commit
4d8d5600d3
35
.github/workflows/release.yml
vendored
Normal file
35
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- '**'
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
# to be used by fork patch-releases ^^
|
||||
- 'v*.*.*-*'
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
|
||||
- name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
TAG=${GITHUB_REF#refs/tags/}
|
||||
echo ::set-output name=tag_name::${TAG}
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/dist
|
49
.goreleaser.yml
Normal file
49
.goreleaser.yml
Normal file
|
@ -0,0 +1,49 @@
|
|||
project_name: boringproxy
|
||||
|
||||
# release:
|
||||
# If set to auto, will mark the release as not ready for production
|
||||
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
|
||||
# If set to true, will mark the release as not ready for production.
|
||||
# Default is false.
|
||||
#
|
||||
# leaving as false for now as all releases are "beta" but they should be full releases
|
||||
# prerelease: auto
|
||||
|
||||
builds:
|
||||
- main: ./cmd/boringproxy
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- freebsd
|
||||
- windows
|
||||
- darwin
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
- arm
|
||||
- '386'
|
||||
goarm:
|
||||
- '7'
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: '386'
|
||||
- goos: darwin
|
||||
goarch: arm
|
||||
goarm: '7'
|
||||
ldflags:
|
||||
- -s -w -X main.Version={{.Version}}
|
||||
|
||||
archives:
|
||||
- format: binary
|
||||
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}"
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
- '^Merge pull request'
|
Loading…
Reference in New Issue
Block a user