Skip to content

Commit

Permalink
ci: release workflow (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixje authored Dec 16, 2022
1 parent 3a36698 commit 150e862
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 37 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/build.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: goreleaser

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-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 --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_HOMEBREW_TAP }}
82 changes: 82 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 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:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
archives:
- format: binary
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
nfpms:
-
package_name: cpm
vendor: COZ Inc.
homepage: https://github.com/CityOfZion/
maintainer: COZ
description: |-
NEO Contract Package Manager
license: MIT
formats:
- apk
- deb
- rpm
- archlinux
#chocolateys:
# -
# project_url: https://github.com/CityOfZion/cpm
# copyright: 2022 COZ Inc
# license_url: https://github.com/CityOfZion/cpm/blob/master/LICENSE
# require_license_acceptance: false
# project_source_url: https://github.com/CityOfZion/cpm
# docs_url: https://github.com/CityOfZion/cpm/blob/main/README.md
# bug_tracker_url: https://github.com/CityOfZion/cpm/issues
# 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.
#
# api_key: '{{ .Env.CHOCOLATEY_API_KEY }}'
# source_repo: "https://push.chocolatey.org/"
#
# # Setting this will prevent goreleaser to actually try to push the package
# # to chocolatey repository, leaving the responsability of publishing it to
# # the user.
# skip_publish: false

# Github release
release:
draft: true
replace_existing_draft: true

# OSX homebrew tap
brews:
-
tap:
owner: CityOfZion
name: homebrew-tap
homepage: https://github.com/CityOfZion/cpm
description: NEO Blockchain Contract Package Manager
skip_upload: false
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Installation
Download the tool from the releases page and place it somewhere on your path
Download the binary from the releases page and place it somewhere on your path, or

## OSX
```shell
brew install CityOfZion/tap/cpm
```

# Usage

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module cpm
go 1.18

require (
github.com/iancoleman/strcase v0.2.0
github.com/nspcc-dev/neo-go v0.99.2
github.com/sirupsen/logrus v1.9.0
github.com/urfave/cli/v2 v2.11.1
Expand All @@ -15,7 +16,6 @@ require (
github.com/google/uuid v1.2.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/iancoleman/strcase v0.2.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 // indirect
github.com/nspcc-dev/rfc6979 v0.2.0 // indirect
Expand Down

0 comments on commit 150e862

Please sign in to comment.