mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
Merge pull request #182 from fopina/github_actions
Goreleaser and Github Actions
This commit is contained in:
commit
17001fdc49
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