Debian Codegraph @

.github/workflows/release.yml

raw symbols SCIP
1 name: Release
2 on:
3 push:
4 tags: '*'
5 env:
6 GOTOOLCHAIN: local
7
8 jobs:
9 build-windows:
10 name: Build Windows Assets
11 environment: production
12 runs-on: windows-latest
13 strategy:
14 matrix:
15 go: ['1.27.x']
16 steps:
17 - uses: actions/checkout@v7
18 with:
19 fetch-depth: 0
20 persist-credentials: false
21 ref: ${{ github.ref }}
22 # We specify the current ref because otherwise the checkout turns
23 # annotated tags into lightweight ones, breaking "git describe".
24 # See https://github.com/actions/checkout/issues/290 and
25 # https://github.com/actions/checkout/issues/882 for details.
26 - run: gem install asciidoctor
27 - uses: actions/setup-go@v7
28 with:
29 go-version: ${{ matrix.go }}
30 - run: mkdir -p "$HOME/go/bin"
31 shell: bash
32 - run: set GOPATH=%HOME%\go
33 - run: choco install -y InnoSetup
34 - run: choco install -y zip
35 - run: choco install -y jq
36 - run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest
37 shell: bash
38 - uses: git-for-windows/setup-git-for-windows-sdk@v2
39 with:
40 flavor: minimal
41 # We install the SDK so as to have access to the msgfmt.exe binary
42 # from the GNU gettext package.
43 - run: mkdir -p bin/releases
44 shell: bash
45 - run: PATH="$HOME/go/bin:$PATH" GOARCH=amd64 go generate && make bin/releases/git-lfs-windows-amd64-$(git describe).zip
46 shell: bash
47 env:
48 FORCE_LOCALIZE: true
49 - run: PATH="$HOME/go/bin:$PATH" GOARCH=386 go generate && make bin/releases/git-lfs-windows-386-$(git describe).zip
50 shell: bash
51 env:
52 FORCE_LOCALIZE: true
53 - run: PATH="$HOME/go/bin:$PATH" GOARCH=arm64 go generate && make bin/releases/git-lfs-windows-arm64-$(git describe).zip
54 shell: bash
55 env:
56 FORCE_LOCALIZE: true
57 - run: make release-windows-stage-1
58 shell: bash
59 env:
60 FORCE_LOCALIZE: true
61 - uses: azure/[email protected]
62 with:
63 azure-tenant-id: ${{ secrets.SPN_GIT_LFS_SIGNING_TENANT_ID }}
64 azure-client-id: ${{ secrets.SPN_GIT_LFS_SIGNING_CLIENT_ID }}
65 azure-client-secret: ${{ secrets.SPN_GIT_LFS_SIGNING }}
66 # Note that the endpoint URI must match the Azure region where our
67 # Signing Account and Certificate Profile were created:
68 # https://github.com/Azure/artifact-signing-action/blob/v1.1.0/README.md?plain=1#L138-L139
69 endpoint: https://wus3.codesigning.azure.net/
70 signing-account-name: GitHubInc
71 certificate-profile-name: GitHubInc
72 files-folder: ${{ github.workspace }}/tmp/stage1
73 files-folder-filter: exe
74 file-digest: SHA256
75 timestamp-rfc3161: http://timestamp.acs.microsoft.com
76 timestamp-digest: SHA256
77 - run: make release-windows-stage-2
78 shell: bash
79 - uses: azure/[email protected]
80 with:
81 azure-tenant-id: ${{ secrets.SPN_GIT_LFS_SIGNING_TENANT_ID }}
82 azure-client-id: ${{ secrets.SPN_GIT_LFS_SIGNING_CLIENT_ID }}
83 azure-client-secret: ${{ secrets.SPN_GIT_LFS_SIGNING }}
84 # Note that the endpoint URI must match the Azure region where our
85 # Signing Account and Certificate Profile were created:
86 # https://github.com/Azure/artifact-signing-action/blob/v1.1.0/README.md?plain=1#L138-L139
87 endpoint: https://wus3.codesigning.azure.net/
88 signing-account-name: GitHubInc
89 certificate-profile-name: GitHubInc
90 files-folder: ${{ github.workspace }}/tmp/stage2
91 files-folder-filter: exe
92 file-digest: SHA256
93 timestamp-rfc3161: http://timestamp.acs.microsoft.com
94 timestamp-digest: SHA256
95 - run: make release-windows-stage-3
96 shell: bash
97 - run: make release-windows-rebuild
98 shell: bash
99 - uses: actions/upload-artifact@v7
100 with:
101 name: windows-assets
102 path: bin/releases
103 build-macos:
104 name: Build macOS Assets
105 environment: production
106 runs-on: macos-latest
107 strategy:
108 matrix:
109 go: ['1.27.x']
110 steps:
111 - uses: actions/checkout@v7
112 with:
113 fetch-depth: 0
114 persist-credentials: false
115 ref: ${{ github.ref }}
116 - run: gem install asciidoctor
117 - uses: actions/setup-go@v7
118 with:
119 go-version: ${{ matrix.go }}
120 - run: make release
121 env:
122 FORCE_LOCALIZE: true
123 - run: CERT_FILE="$HOME/cert.p12" make release-write-certificate
124 env:
125 CERT_CONTENTS: ${{secrets.GATEWATCHER_DEVELOPER_ID_CERT}}
126 - run: CERT_FILE="$HOME/cert.p12" make release-import-certificate
127 env:
128 CERT_PASS: ${{secrets.GATEWATCHER_DEVELOPER_ID_PASSWORD}}
129 - run: make release-darwin
130 env:
131 DARWIN_DEV_USER: ${{secrets.MACOS_DEV_USER}}
132 DARWIN_DEV_PASS: ${{secrets.MACOS_DEV_PASS}}
133 DARWIN_DEV_TEAM: ${{secrets.MACOS_DEV_TEAM}}
134 - uses: actions/upload-artifact@v7
135 with:
136 name: macos-assets
137 path: bin/releases
138 build-main:
139 name: Main Release Assets
140 needs:
141 - build-windows
142 - build-macos
143 runs-on: ubuntu-latest
144 strategy:
145 matrix:
146 go: ['1.27.x']
147 steps:
148 - uses: actions/checkout@v7
149 with:
150 fetch-depth: 0
151 persist-credentials: false
152 ref: ${{ github.ref }}
153 - run: sudo gem install asciidoctor
154 - uses: actions/setup-go@v7
155 with:
156 go-version: ${{ matrix.go }}
157 - run: sudo apt-get update && sudo apt-get -y install gettext libarchive-tools
158 env:
159 DEBIAN_FRONTEND: noninteractive
160 - uses: actions/download-artifact@v8
161 with:
162 name: windows-assets
163 path: windows-assets
164 - uses: actions/download-artifact@v8
165 with:
166 name: macos-assets
167 path: macos-assets
168 - run: CGO_ENABLED=0 make release
169 - run: rm -f bin/releases/*windows* bin/releases/*darwin*
170 - run: 'find windows-assets -name "*windows*" -type f | xargs -I{} mv {} bin/releases'
171 - run: 'find macos-assets -name "*darwin*" -type f | xargs -I{} mv {} bin/releases'
172 - run: rm -f bin/releases/git-lfs-windows-assets*.tar.gz
173 - run: mkdir -p release-assets/bin
174 - run: mv bin/releases release-assets/bin
175 - uses: actions/upload-artifact@v7
176 with:
177 name: release-assets
178 path: release-assets
179 build-docker:
180 name: Build Linux Packages
181 environment: production
182 runs-on: ubuntu-latest
183 steps:
184 - uses: actions/checkout@v7
185 with:
186 fetch-depth: 0
187 persist-credentials: false
188 ref: ${{ github.ref }}
189 - run: sudo gem install packagecloud-ruby
190 - run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers"
191 - run: (cd "$HOME/build-dockers" && ./build_dockers.bsh)
192 - run: ./docker/run_dockers.bsh --prune
193 # If this is a pre-release tag, don't upload anything to packagecloud.
194 - run: '[ -z "${GITHUB_REF%%refs/tags/*-pre*}" ] || ./script/packagecloud.rb'
195 env:
196 PACKAGECLOUD_TOKEN: ${{secrets.PACKAGECLOUD_TOKEN}}
197 build-docker-arm:
198 name: Build Linux ARM packages
199 runs-on: ubuntu-24.04-arm
200 steps:
201 - uses: actions/checkout@v7
202 with:
203 fetch-depth: 0
204 persist-credentials: false
205 ref: ${{ github.ref }}
206 - run: sudo gem install packagecloud-ruby
207 - run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers"
208 - run: (cd "$HOME/build-dockers" && ./build_dockers.bsh --arch=arm64 debian_11 debian_12 debian_13)
209 - run: ./docker/run_dockers.bsh --prune --arch=arm64 debian_11 debian_12 debian_13
210 # If this is a pre-release tag, don't upload anything to packagecloud.
211 - run: '[ -z "${GITHUB_REF%%refs/tags/*-pre*}" ] || ./script/packagecloud.rb'
212 env:
213 PACKAGECLOUD_TOKEN: ${{secrets.PACKAGECLOUD_TOKEN}}