Skip to content

Commit

Permalink
setup: split goreleaser config into unix and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje committed Nov 29, 2023
1 parent 2146cc8 commit 9017d9c
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 32 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
contents: write

jobs:
goreleaser:
goreleaser-unix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -24,7 +24,25 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --clean
args: release --clean --config .goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GH_HOMEBREW_TAP }}
goreleaser-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
with:
go-version: '>=1.19.4'
cache: true
- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean --config .goreleaser-windows.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
56 changes: 56 additions & 0 deletions .goreleaser-windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
project_name: cpm
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- windows
goarch:
- amd64
- arm64
archives:
- format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
chocolateys:
-
name: cpm
owners: COZ
title: Contract Package Manager
authors: Erik van den Brink
project_url: https://github.com/CityOfZion/cpm
url_template: "https://github.com/CityOfZion/cpm/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
copyright: 2023 COZ
require_license_acceptance: false
project_source_url: https://github.com/CityOfZion/cpm
docs_url: https://github.com/CityOfZion/cpm/blob/master/README.md
bug_tracker_url: https://github.com/CityOfZion/cpm/issues
tags: 'neo neo3 blockchain contract package-manager manager sdk golang csharp python java typescript ts'
summary: NEO Blockchain Contract Package Manager
description: |
{{ .ProjectName }} installer package.
Download selected contracts from a chain to your local chain for development purposes.
Generate SDKs for selected contracts to work with.
release_notes: "https://github.com/CityOfZion/cpm/releases/tag/v{{ .Version }}"
api_key: '{{ .Env.CHOCOLATEY_API_KEY }}'
source_repo: "https://push.chocolatey.org/"
skip_publish: false

# Github release
release:
draft: true
replace_existing_draft: false
31 changes: 1 addition & 30 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,10 @@ builds:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
archives:
-
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
Expand All @@ -45,34 +39,11 @@ nfpms:
- deb
- rpm
- archlinux
chocolateys:
-
name: cpm
owners: COZ
title: Contract Package Manager
authors: Erik van den Brink
project_url: https://github.com/CityOfZion/cpm
url_template: "https://github.com/CityOfZion/cpm/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
copyright: 2023 COZ
require_license_acceptance: false
project_source_url: https://github.com/CityOfZion/cpm
docs_url: https://github.com/CityOfZion/cpm/blob/master/README.md
bug_tracker_url: https://github.com/CityOfZion/cpm/issues
tags: 'neo neo3 blockchain contract package-manager manager sdk golang csharp python java typescript ts'
summary: NEO Blockchain Contract Package Manager
description: |
{{ .ProjectName }} installer package.
Download selected contracts from a chain to your local chain for development purposes.
Generate SDKs for selected contracts to work with.
release_notes: "https://github.com/CityOfZion/cpm/releases/tag/v{{ .Version }}"
api_key: '{{ .Env.CHOCOLATEY_API_KEY }}'
source_repo: "https://push.chocolatey.org/"
skip_publish: false

# Github release
release:
draft: true
replace_existing_draft: true
replace_existing_draft: false

# OSX homebrew tap
brews:
Expand Down

0 comments on commit 9017d9c

Please sign in to comment.