-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: saltbo <[email protected]>
- Loading branch information
Showing
7 changed files
with
77 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ | |
# 并将其链接到词根库 | ||
|
||
# 统计单词量、词根数以及词根覆盖度 | ||
name: release | ||
|
||
on: | ||
push: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
# run only against tags | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
# issues: 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@v4 | ||
with: | ||
go-version: stable | ||
- uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ | |
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
data | ||
data | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
dist: ./build/release | ||
before: | ||
hooks: | ||
- go mod download | ||
builds: | ||
- id: server | ||
main: ./main.go | ||
binary: bin/{{ .ProjectName }} | ||
ldflags: | ||
- -s -w | ||
- -X github.com/bonaysoft/{{ .ProjectName }}/cmd.release={{.Version}} | ||
- -X github.com/bonaysoft/{{ .ProjectName }}/cmd.commit={{.Commit}} | ||
- -X github.com/bonaysoft/{{ .ProjectName }}/cmd.repo={{.GitURL}} | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
|
||
dockers: | ||
- image_templates: | ||
- "ghcr.io/bonaysoft/{{ .ProjectName }}:v{{ .Major }}.{{ .Minor }}" | ||
- "ghcr.io/bonaysoft/{{ .ProjectName }}:latest" | ||
extra_files: | ||
- dict/roots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM debian:10 | ||
|
||
ENV APP_HOME /srv | ||
WORKDIR $APP_HOME | ||
|
||
COPY engra $APP_HOME | ||
COPY dict $APP_HOME/dict | ||
|
||
CMD ["./engra", "serve"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters