Skip to content

Commit 0819c69

Browse files
committed
Update goreleaser and CI
1 parent 9287e15 commit 0819c69

File tree

2 files changed

+45
-87
lines changed

2 files changed

+45
-87
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,22 @@ jobs:
3333
args: release
3434
env:
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
UPLOAD_DEBPKG-AMD_SECRET: ${{ secrets.PACKAGE_REPO_SECRET }}
37-
UPLOAD_DEBPKG-ARM_SECRET: ${{ secrets.PACKAGE_REPO_SECRET }}
38-
UPLOAD_APKPKG-AMD_SECRET: ${{ secrets.PACKAGE_REPO_SECRET }}
39-
UPLOAD_RPMPKG-AMD_SECRET: ${{ secrets.PACKAGE_REPO_SECRET }}
4036
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
4137
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}
4238
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
4339
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
4440
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
4541
OSSIGN_CONFIG: ${{ secrets.OSSIGN_CONFIG }}
4642

43+
- name: Upload Gitea artifacts (due to buggy behaviour with goreleaser)
44+
run: |
45+
curl --upload-file dist/tlsniff_linux_amd64.deb -u "ossign-dev:${{ secrets.PACKAGE_REPO_SECRET }}" https://pkg.ossign.org/debian/pool/all/main/upload
46+
curl --upload-file dist/tlsniff_linux_arm64.deb -u "ossign-dev:${{ secrets.PACKAGE_REPO_SECRET }}" https://pkg.ossign.org/debian/pool/all/main/upload
47+
curl --upload-file dist/tlsniff_linux_amd64.rpm -u "ossign-dev:${{ secrets.PACKAGE_REPO_SECRET }}" https://pkg.ossign.org/rpm/upload
48+
curl --upload-file dist/tlsniff_linux_arm64.rpm -u "ossign-dev:${{ secrets.PACKAGE_REPO_SECRET }}" https://pkg.ossign.org/rpm/upload
49+
curl --upload-file dist/tlsniff_linux_amd64.apk -u "ossign-dev:${{ secrets.PACKAGE_REPO_SECRET }}" https://pkg.ossign.org/alpine/all/repository
50+
curl --upload-file dist/tlsniff_linux_arm64.apk -u "ossign-dev:${{ secrets.PACKAGE_REPO_SECRET }}" https://pkg.ossign.org/alpine/all/repository
51+
4752
- name: Upload artifacts
4853
uses: actions/upload-artifact@v4
4954
with:

.goreleaser.yml

Lines changed: 36 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
version: 2
22

33
builds:
4-
- id: linuxbuild-amd
4+
- id: linux
55
main: main.go
66
env:
77
- CGO_ENABLED=0
88
goos:
99
- linux
1010
goarch:
1111
- amd64
12-
13-
- id: linuxbuild-arm
14-
main: main.go
15-
env:
16-
- CGO_ENABLED=0
17-
goos:
18-
- linux
19-
goarch:
2012
- arm64
21-
22-
- id: macbuild
13+
14+
- id: mac
2315
main: main.go
2416
env:
2517
- CGO_ENABLED=0
@@ -28,8 +20,8 @@ builds:
2820
goarch:
2921
- amd64
3022
- arm64
31-
32-
- id: winbuild
23+
24+
- id: windows
3325
main: main.go
3426
env:
3527
- CGO_ENABLED=0
@@ -38,19 +30,27 @@ builds:
3830
goarch:
3931
- amd64
4032
- arm64
41-
33+
4234
archives:
43-
- formats: [ tar.gz, binary ]
35+
- id: unixarchive
36+
ids:
37+
- linux
38+
- mac
39+
formats: [ tar.gz, binary ]
4440
name_template: >-
4541
{{ .ProjectName }}_
46-
{{- title .Os }}_
47-
{{- if eq .Arch "amd64" }}x86_64
48-
{{- else if eq .Arch "386" }}i386
42+
{{- .Os }}_
43+
{{- else }}{{ .Arch }}{{ end }}
44+
{{- if .Arm }}v{{ .Arm }}{{ end }}
45+
- id: windowsarchive
46+
ids:
47+
- windows
48+
formats: [ zip, binary ]
49+
name_template: >-
50+
{{ .ProjectName }}_
51+
{{- .Os }}_
4952
{{- else }}{{ .Arch }}{{ end }}
5053
{{- if .Arm }}v{{ .Arm }}{{ end }}
51-
format_overrides:
52-
- goos: windows
53-
formats: [ zip, binary ]
5454
5555
changelog:
5656
sort: asc
@@ -60,52 +60,30 @@ changelog:
6060
- "^test:"
6161

6262
nfpms:
63-
- id: linuxbuild-amd-nfpms
63+
- id: nfpms
6464
ids:
65-
- linuxbuild-amd
66-
package_name: "tlsniff"
67-
description: "tlsniff - A certificate information tool"
68-
vendor: "OSSign"
69-
maintainer: OSSign <contact@ossign.org>
70-
file_name_template: >-
71-
{{ .ProjectName }}_
72-
{{- title .Os }}_
73-
{{- if eq .Arch "amd64" }}amd64
74-
{{- else if eq .Arch "386" }}i386
75-
{{- else }}{{ .Arch }}{{ end }}
76-
{{- if .Arm }}v{{ .Arm }}{{ end }}
65+
- linux
7766
formats:
7867
- deb
7968
- apk
8069
- rpm
81-
bindir: /usr/local/bin
82-
83-
- id: linuxbuild-arm-nfpms
84-
ids:
85-
- linuxbuild-arm
8670
package_name: "tlsniff"
8771
description: "tlsniff - A certificate information tool"
8872
vendor: "OSSign"
8973
maintainer: OSSign <contact@ossign.org>
9074
file_name_template: >-
9175
{{ .ProjectName }}_
92-
{{- title .Os }}_
93-
{{- if eq .Arch "amd64" }}amd64
94-
{{- else if eq .Arch "386" }}i386
76+
{{- .Os }}_
9577
{{- else }}{{ .Arch }}{{ end }}
9678
{{- if .Arm }}v{{ .Arm }}{{ end }}
97-
formats:
98-
- deb
99-
- apk
100-
- rpm
101-
bindir: /usr/local/bin
10279
103-
binary_signs:
104-
- id: tlsniff
80+
signs:
81+
- id: win-sign
10582
ids:
106-
- winbuild
83+
- windows
10784
cmd: ossign
108-
signature: "${artifact}"
85+
output: true
86+
artifacts: "binary"
10987
args:
11088
- "-o"
11189
- ${artifact}
@@ -117,7 +95,8 @@ notarize:
11795
macos:
11896
- enabled: true
11997
ids:
120-
- macbuild
98+
- mac
99+
121100
sign:
122101
certificate: "{{ .Env.MACOS_SIGN_P12 }}"
123102
password: "{{ .Env.MACOS_SIGN_PASSWORD }}"
@@ -131,37 +110,11 @@ notarize:
131110
timeout: 20m
132111

133112
release:
113+
ids:
114+
- mac
115+
- win-sign
116+
- nfpms
117+
- linux
134118
github:
135119
owner: ossign
136120
name: tlsniff
137-
138-
uploads:
139-
- name: "debpkg-amd"
140-
ids: ["linuxbuild-amd-nfpms"]
141-
method: "PUT"
142-
exts:
143-
- deb
144-
mode: archive
145-
username: "ossign-dev"
146-
target: https://pkg.ossign.org/debian/pool/all/main/upload
147-
custom_artifact_name: true
148-
149-
- name: "apkpkg-amd"
150-
method: "PUT"
151-
ids: ["linuxbuild-amd-nfpms"]
152-
exts:
153-
- apk
154-
mode: archive
155-
username: "ossign-dev"
156-
target: https://pkg.ossign.org/alpine/all/repository
157-
custom_artifact_name: true
158-
159-
- name: "rpmpkg-amd"
160-
method: "PUT"
161-
ids: ["linuxbuild-amd-nfpms"]
162-
exts:
163-
- rpm
164-
mode: archive
165-
username: "ossign-dev"
166-
target: https://pkg.ossign.org/rpm/upload
167-
custom_artifact_name: true

0 commit comments

Comments
 (0)