From e085d733d51b83c7fd92188b57a3407e26986e5f Mon Sep 17 00:00:00 2001 From: Juan Font Date: Sun, 13 Jun 2021 13:12:48 +0200 Subject: [PATCH 1/4] Rename original CI pipeline to test --- .github/workflows/{ci.yml => test.yml} | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) rename .github/workflows/{ci.yml => test.yml} (95%) diff --git a/.github/workflows/ci.yml b/.github/workflows/test.yml similarity index 95% rename from .github/workflows/ci.yml rename to .github/workflows/test.yml index b75dbcc1..774b1ca2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: # The "build" workflow - build: + test: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -41,6 +41,3 @@ jobs: - name: Run lint run: make lint - - name: Run build - run: make - From 61054638d13f358d02d199507fa22cb9ec6a5375 Mon Sep 17 00:00:00 2001 From: Juan Font Date: Sun, 13 Jun 2021 13:13:17 +0200 Subject: [PATCH 2/4] Use goreleaser on new tags --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..122853f9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: goreleaser + +on: + push: + tags: + - "*" # triggers only if push new tag version + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 42e147e46fd8a69f58d0dc7f92f16b75a38b1f44 Mon Sep 17 00:00:00 2001 From: Juan Font Date: Sun, 13 Jun 2021 15:04:30 +0200 Subject: [PATCH 3/4] Keep make build, just as an extra test --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 774b1ca2..a96971a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,3 +41,5 @@ jobs: - name: Run lint run: make lint + - name: Run build + run: make \ No newline at end of file From da8014074cee0b15306df8dc8aa7b076c7caf153 Mon Sep 17 00:00:00 2001 From: Juan Font Date: Mon, 14 Jun 2021 09:17:23 +0200 Subject: [PATCH 4/4] Added missing goreleaser file --- .goreleaser.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 00000000..e6e9451d --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,40 @@ +# This is an example .goreleaser.yml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +before: + hooks: + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm + - arm64 + goarm: + - 6 + - 7 + + main: ./cmd/headscale/headscale.go + mod_timestamp: '{{ .CommitTimestamp }}' + +archives: + - replacements: + darwin: Darwin + linux: Linux + windows: Windows + amd64: x86_64 + +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:'