Skip to content

Commit b7e29ad

Browse files
test
1 parent c584641 commit b7e29ad

File tree

2 files changed

+56
-3
lines changed

2 files changed

+56
-3
lines changed

.github/workflows/go.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
# For now we are not releasing the CLI, as we are making some quicker iterations
4848
release:
4949
needs: [test]
50-
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.event_name == 'push'
50+
# if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.event_name == 'push'
5151
runs-on: ubuntu-latest
5252
steps:
5353
- name: Checkout
@@ -59,6 +59,9 @@ jobs:
5959
- name: "Git Version"
6060
id: generate-version
6161
uses: codacy/[email protected]
62+
with:
63+
release-branch: main
64+
prefix: v
6265
- name: "Tag version"
6366
run: |
6467
git tag ${{ steps.generate-version.outputs.version }}
@@ -67,8 +70,7 @@ jobs:
6770
uses: goreleaser/goreleaser-action@v5
6871
with:
6972
distribution: goreleaser
70-
# 'latest', 'nightly', or a semver
71-
version: "latest"
73+
version: latest
7274
args: release --clean
7375
env:
7476
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
project_name: codacy-cli-v2
2+
3+
before:
4+
hooks:
5+
- go mod tidy
6+
7+
builds:
8+
- env:
9+
- CGO_ENABLED=0
10+
goos:
11+
- linux
12+
- windows
13+
- darwin
14+
goarch:
15+
- amd64
16+
- arm64
17+
ldflags:
18+
- -s -w
19+
- -X codacy/cli-v2/version.Version={{.Version}}
20+
- -X codacy/cli-v2/version.GitCommit={{.ShortCommit}}
21+
- -X codacy/cli-v2/version.BuildTime={{.Date}}
22+
- -X codacy/cli-v2/version.Os={{.Os}}
23+
- -X codacy/cli-v2/version.Arch={{.Arch}}
24+
- -X codacy/cli-v2/version.GoVersion={{.Runtime.Version}}
25+
binary: cli-v2
26+
27+
archives:
28+
- format: tar.gz
29+
name_template: >-
30+
{{ .ProjectName }}_
31+
{{- .Version }}_
32+
{{- .Os }}_
33+
{{- .Arch }}
34+
format_overrides:
35+
- goos: windows
36+
format: zip
37+
38+
changelog:
39+
sort: asc
40+
filters:
41+
exclude:
42+
- '^docs:'
43+
- '^test:'
44+
- '^ci:'
45+
- Merge pull request
46+
- Merge branch
47+
48+
release:
49+
github:
50+
owner: codacy
51+
name: codacy-cli-v2

0 commit comments

Comments
 (0)