@@ -13,6 +13,9 @@ concurrency:
1313
1414env :
1515 SQLX_OFFLINE : " 1"
16+ # sccache
17+ SCCACHE_GHA_ENABLED : " true"
18+ RUSTC_WRAPPER : " sccache"
1619
1720jobs :
1821 build-docker-release :
@@ -113,6 +116,9 @@ jobs:
113116 with :
114117 targets : " aarch64-unknown-linux-gnu"
115118
119+ - name : Run sccache-cache
120+ uses : mozilla-actions/sccache-action@v0.0.9
121+
116122 - name : Build Linux x86_64 binary
117123 run : |
118124 cargo build --locked --release --target x86_64-unknown-linux-gnu
@@ -138,18 +144,8 @@ jobs:
138144 tar -zcf defguard-proxy-${{ github.ref_name }}-x86_64-unknown-freebsd.tar.gz \
139145 defguard-proxy-${{ github.ref_name }}-x86_64-unknown-freebsd
140146
141- # - name: Upload release archive
142- # uses: actions/upload-release-asset@v1.0.2
143- # env:
144- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145- # with:
146- # upload_url: ${{ needs.create-release.outputs.upload_url }}
147- # asset_path: defguard-proxy-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
148- # asset_name: defguard-proxy-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
149- # asset_content_type: application/octet-stream
150-
151147 - name : Build x86_64 DEB package
152- uses : bpicode/github -action-fpm@master
148+ uses : defGuard/fpm -action@main
153149 with :
154150 fpm_args :
155151 " defguard-proxy-${{ github.ref_name }}-x86_64-unknown-linux-gnu=/usr/bin/defguard-proxy
@@ -158,26 +154,16 @@ jobs:
158154 fpm_opts : " --architecture ${{ matrix.arch }} --debug --output-type deb --version ${{ env.VERSION }} --package defguard-proxy-${{ env.VERSION }}-x86_64-unknown-linux-gnu.deb"
159155
160156 - name : Build aarch64 DEB package
161- uses : bpicode/github -action-fpm@master
157+ uses : defGuard/fpm -action@main
162158 with :
163159 fpm_args :
164160 " defguard-proxy-${{ github.ref_name }}-aarch64-unknown-linux-gnu=/usr/bin/defguard-proxy
165161 defguard-proxy.service=/usr/lib/systemd/system/defguard-proxy.service
166162 example-config.toml=/etc/defguard/proxy.toml"
167163 fpm_opts : " --architecture ${{ matrix.arch }} --debug --output-type deb --version ${{ env.VERSION }} --package defguard-proxy-${{ env.VERSION }}-aarch64-unknown-linux-gnu.deb"
168164
169- # - name: Upload DEB
170- # uses: actions/upload-release-asset@v1.0.2
171- # env:
172- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173- # with:
174- # upload_url: ${{ needs.create-release.outputs.upload_url }}
175- # asset_path: defguard-proxy-${{ env.VERSION }}-x86_64-unknown-linux-gnu.deb
176- # asset_name: defguard-proxy-${{ env.VERSION }}-x86_64-unknown-linux-gnu.deb
177- # asset_content_type: application/octet-stream
178-
179165 - name : Build x86_64 RPM package
180- uses : bpicode/github -action-fpm@master
166+ uses : defGuard/fpm -action@main
181167 with :
182168 fpm_args :
183169 " defguard-proxy-${{ github.ref_name }}-x86_64-unknown-linux-gnu=/usr/bin/defguard-proxy
@@ -186,39 +172,89 @@ jobs:
186172 fpm_opts : " --architecture ${{ matrix.arch }} --debug --output-type rpm --version ${{ env.VERSION }} --package defguard-proxy-${{ env.VERSION }}-x86_64-unknown-linux-gnu.rpm"
187173
188174 - name : Build aarch64 RPM package
189- uses : bpicode/github -action-fpm@master
175+ uses : defGuard/fpm -action@main
190176 with :
191177 fpm_args :
192178 " defguard-proxy-${{ github.ref_name }}-aarch64-unknown-linux-gnu=/usr/bin/defguard-proxy
193179 defguard-proxy.service=/usr/lib/systemd/system/defguard-proxy.service
194180 example-config.toml=/etc/defguard/proxy.toml"
195181 fpm_opts : " --architecture ${{ matrix.arch }} --debug --output-type rpm --version ${{ env.VERSION }} --package defguard-proxy-${{ env.VERSION }}-aarch64-unknown-freebsd.rpm"
196182
197- # - name: Upload RPM
198- # uses: actions/upload-release-asset@v1.0.2
199- # env:
200- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
201- # with:
202- # upload_url: ${{ needs.create-release.outputs.upload_url }}
203- # asset_path: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.rpm
204- # asset_name: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.rpm
205- # asset_content_type: application/octet-stream
206-
207183 - name : Build FreeBSD package
208- uses : bpicode/github -action-fpm@master
184+ uses : defGuard/fpm -action@main
209185 with :
210186 fpm_args :
211187 " defguard-${{ github.ref_name }}-x86_64-unknown-freebsd=/usr/local/bin/defguard-proxy
212188 defguard-proxy.service.freebsd=/usr/local/etc/rc.d/defguard-proxy
213189 example-config.toml=/etc/defguard/proxy.toml"
214190 fpm_opts : " --architecture ${{ matrix.arch }} --debug --output-type freebsd --version ${{ env.VERSION }} --package defguard-${{ env.VERSION }}_x86_64-unknown-freebsd.pkg --freebsd-osversion '*' --depends openssl"
215191
216- # - name: Upload FreeBSD
217- # uses: actions/upload-release-asset@v1.0.2
218- # env:
219- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
220- # with:
221- # upload_url: ${{ needs.create-release.outputs.upload_url }}
222- # asset_path: defguard-${{ env.VERSION }}_${{ matrix.target }}.pkg
223- # asset_name: defguard-${{ env.VERSION }}_${{ matrix.target }}.pkg
224- # asset_content_type: application/octet-stream
192+ - name : Upload Linux x86_64 archive
193+ uses : shogo82148/actions-upload-release-asset@v1
194+ env :
195+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
196+ with :
197+ upload_url : ${{ needs.create-release.outputs.upload_url }}
198+ asset_path : defguard-proxy-${{ github.ref_name }}-x86_64-unknown-linux-gnu.tar.gz
199+ asset_content_type : application/gzip
200+ overwrite : true
201+
202+ - name : Upload Linux aarch64 archive
203+ uses : shogo82148/actions-upload-release-asset@v1
204+ env :
205+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
206+ with :
207+ upload_url : ${{ needs.create-release.outputs.upload_url }}
208+ asset_path : defguard-proxy-${{ github.ref_name }}-aarch64-unknown-linux-gnu.tar.gz
209+ asset_content_type : application/gzip
210+ overwrite : true
211+
212+ - name : Upload Linux x86_64 DEB
213+ uses : shogo82148/actions-upload-release-asset@v1
214+ env :
215+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
216+ with :
217+ upload_url : ${{ needs.create-release.outputs.upload_url }}
218+ asset_path : defguard-proxy-${{ env.VERSION }}-x86_64-unknown-linux-gnu.deb
219+ asset_content_type : application/gzip
220+ overwrite : true
221+
222+ - name : Upload Linux aarch64 DEB
223+ uses : shogo82148/actions-upload-release-asset@v1
224+ env :
225+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
226+ with :
227+ upload_url : ${{ needs.create-release.outputs.upload_url }}
228+ asset_path : defguard-proxy-${{ env.VERSION }}-aarch64-unknown-linux-gnu.deb
229+ asset_content_type : application/gzip
230+ overwrite : true
231+
232+ - name : Upload Linux x86_64 RPM
233+ uses : shogo82148/actions-upload-release-asset@v1
234+ env :
235+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
236+ with :
237+ upload_url : ${{ needs.create-release.outputs.upload_url }}
238+ asset_path : defguard-proxy-${{ env.VERSION }}-x86_64-unknown-linux-gnu.rpm
239+ asset_content_type : application/gzip
240+ overwrite : true
241+
242+ - name : Upload Linux aarch64 RPM
243+ uses : shogo82148/actions-upload-release-asset@v1
244+ env :
245+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
246+ with :
247+ upload_url : ${{ needs.create-release.outputs.upload_url }}
248+ asset_path : defguard-proxy-${{ env.VERSION }}-aarch64-unknown-linux-gnu.rpm
249+ asset_content_type : application/gzip
250+ overwrite : true
251+
252+ - name : Upload FreeBSD package
253+ uses : shogo82148/actions-upload-release-asset@v1
254+ env :
255+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
256+ with :
257+ upload_url : ${{ needs.create-release.outputs.upload_url }}
258+ asset_path : defguard-${{ env.VERSION }}_x86_64-unknown-freebsd.pkg
259+ asset_content_type : application/x-pkg
260+ overwrite : true
0 commit comments