From 31ef8b1902ebe009fc50cfae5c6ddd1c9b7b96f9 Mon Sep 17 00:00:00 2001 From: Nelson Isioma Date: Thu, 26 Sep 2024 08:55:15 +0100 Subject: [PATCH] fix: updating build script and workflows (#21) --- .github/workflows/release.yml | 8 ++++++-- .goreleaser.yaml | 24 ++++++++---------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0fa9e0a..7694bb9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ permissions: jobs: goreleaser: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -23,6 +23,9 @@ jobs: with: go-version: 1.19 + - name: Verify Chocolatey installation + run: choco --version + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: @@ -30,4 +33,5 @@ jobs: version: ${{ env.GITHUB_REF_NAME }} args: release --clean env: - GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} + CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }} \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 277b362..c953ec3 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -25,15 +25,13 @@ builds: - darwin - windows - freebsd - goarm: - - 6 - - 7 - goamd64: - - v2 - - v3 -release: - prerelease: auto +archives: + - format: tar.gz + # use zip for windows archives + format_overrides: + - goos: windows + format: zip brews: - @@ -68,19 +66,13 @@ chocolateys: - **Security**: how safe and secure is your API? It's akin to having a strong hull to protect against the stormy seas of cyber threats. release_notes: "https://github.com/treblle/treblle-cli/releases/tag/v{{ .Version }}" - api_key: "{{ secrets.CHOCOLATEY_API_KEY }}" + api_key: "{{ .Env.CHOCOLATEY_API_KEY }}" source_repo: "https://push.chocolatey.org/" + skip_publish: false checksum: name_template: 'checksums.txt' -archives: - - format: tar.gz - # use zip for windows archives - format_overrides: - - goos: windows - format: zip - changelog: sort: asc filters: