Skip to content

Commit

Permalink
Chore: 修改版本号命名方案,改用 git describe 获得
Browse files Browse the repository at this point in the history
  • Loading branch information
dzpao committed Jan 29, 2020
1 parent 15043ed commit a876b8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
- name: Check out code
uses: actions/checkout@v1

- name: Set env via git describe
run: echo ::set-env name=GIT_DESCRIBE::$(git describe --always --tags --dirty)

- name: Validates Goreleaser config
uses: docker://goreleaser/goreleaser:latest
with:
Expand Down
5 changes: 3 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ archives:
- README.md
- config-example.json
- config-example.yaml
name_template: "{{ .ProjectName }}_{{ .Env.GIT_DESCRIBE }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
wrap_in_directory: true
format: tar.gz
format_overrides:
Expand All @@ -51,11 +52,11 @@ checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ .Tag }}-next-g{{ .ShortCommit }}"
name_template: "snapshot-{{ .Env.GIT_DESCRIBE }}"

release:
prerelease: auto
name_template: "v{{ .Tag }}-g{{ .ShortCommit }}"
name_template: "{{ .Env.GIT_DESCRIBE }}"

changelog:
filters:
Expand Down

0 comments on commit a876b8f

Please sign in to comment.