From 6da6400918dd01e0e04d4584f59667ac31dec676 Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Mon, 13 May 2024 19:46:52 +0300 Subject: [PATCH] macos-test --- .github/workflows/release.yml | 36 ++++++++++++++++------- .gitignore | 3 +- .goreleaser.yml => .goreleaser-darwin.yml | 10 ++++--- 3 files changed, 34 insertions(+), 15 deletions(-) rename .goreleaser.yml => .goreleaser-darwin.yml (84%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8dc00ab..84103ff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: ci +name: release on: # push: @@ -9,11 +9,8 @@ on: jobs: -# TODO: add more OS -# TODO: goreleaser - - release-linux-binary: - runs-on: ubuntu-latest + macos: + runs-on: macos-latest steps: - uses: actions/checkout@v4 @@ -26,8 +23,27 @@ jobs: uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser - # 'latest', 'nightly', or a semver - version: '~> v1' - args: build --clean + args: build --clean --config=.goreleaser-darwin.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +# linux: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# +# - name: Set up Go +# uses: actions/setup-go@v5 +# with: +# go-version: '1.20' +# +# - name: Run GoReleaser +# uses: goreleaser/goreleaser-action@v5 +# with: +# distribution: goreleaser +# args: build --clean --config=.goreleaser-linux.yml # env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# +# windows: +# runs-on: windows-latest \ No newline at end of file diff --git a/.gitignore b/.gitignore index 62c8935..c7222cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea/ \ No newline at end of file +.idea/ +dist \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser-darwin.yml similarity index 84% rename from .goreleaser.yml rename to .goreleaser-darwin.yml index 2acd1fc..5ce9b33 100644 --- a/.goreleaser.yml +++ b/.goreleaser-darwin.yml @@ -2,16 +2,18 @@ version: 1 before: hooks: - - go mod tidy -# - go generate ./... +# - go mod tidy builds: - goos: - - linux - - windows +# - linux +# - windows - darwin goarch: - amd64 + - arm64 + env: + - CGO_ENABLED=1 archives: - format: tar.gz