Skip to content

Commit

Permalink
Merge pull request #214 from ikawaha/develop
Browse files Browse the repository at this point in the history
Release candidate
  • Loading branch information
ikawaha authored Oct 28, 2020
2 parents afbcfb0 + f332765 commit 5d24b7b
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 7 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- 'v'

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.15.x'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --config .goreleaser.yml
env:
GITHUB_TOKEN: ${{ github.token }}
38 changes: 38 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
env:
- GO111MODULE=on
before:
hooks:
- go mod download
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- 386
- amd64
- arm
- arm64
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser
brews:
-
tap:
owner: ikawaha
name: homebrew-kagome
commit_author:
name: goreleaserbot
email: [email protected]
description: "Self-contained Japanese Morphological Analyzer written in pure Go."
homepage: "https://github.com/ikawaha/kagome"
dependencies:
- go
install: |
bin.install Dir['kagome']
test: |
system "#{bin}/kagome"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN \
CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} GOARM=${GOARM} go build \
--ldflags "-w -s -extldflags \"-static\" -X 'main.version=${version_app}'" \
-o /go/bin/kagome \
/go/src/github.com/ikawaha/kagome/cmd/kagome && \
/go/src/github.com/ikawaha/kagome && \
echo "- Smoke test (run kagome version command) ... $(/go/bin/kagome version)"

# 2nd stage: Copy only the built binary to shrink the image size.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ output:
## Install

```shellsession
env GO111MODULE=on go get -u github.com/ikawaha/kagome/v2/...
env GO111MODULE=on go get -u github.com/ikawaha/kagome/v2
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "kagome",
"description": "Kagome Japanese Morphological Analyzer",
"env": {
"GOVERSION": "go1.14",
"GO_INSTALL_PACKAGE_SPEC": "./cmd/kagome"
"GOVERSION": "go1.15",
"GO_INSTALL_PACKAGE_SPEC": "."
},
"buildpacks": [
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions cmd/kagome/main.go → main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"os"
"path/filepath"

"github.com/ikawaha/kagome/v2/cmd/kagome/lattice"
"github.com/ikawaha/kagome/v2/cmd/kagome/server"
"github.com/ikawaha/kagome/v2/cmd/kagome/tokenize"
"github.com/ikawaha/kagome/v2/cmd/lattice"
"github.com/ikawaha/kagome/v2/cmd/server"
"github.com/ikawaha/kagome/v2/cmd/tokenize"
)

type subcommand struct {
Expand Down

0 comments on commit 5d24b7b

Please sign in to comment.