Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .fpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-s dir
--name defguard-proxy
--architecture x86_64
--description "defguard proxy service"
--url "https://defguard.net/"
--maintainer "teonite"
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,26 @@ jobs:
[registry."docker.io"]
mirrors = ["dockerhub-proxy.teonite.net"]

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache-dependency-path: ./web/pnpm-lock.yaml

- name: Install frontend dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
working-directory: web

- name: Build frontend
run: pnpm build
working-directory: web

- name: Build release binary
uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -140,3 +160,39 @@ jobs:
asset_path: defguard-proxy-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
asset_name: defguard-proxy-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
asset_content_type: application/octet-stream

- name: Build DEB package
if: matrix.build == 'linux'
uses: bpicode/github-action-fpm@master
with:
fpm_args: "defguard-proxy-${{ github.ref_name }}-${{ matrix.target }}=/usr/bin/defguard-proxy defguard-proxy.service=/usr/lib/systemd/system/defguard-proxy.service example-config.toml=/etc/defguard/proxy.toml"
fpm_opts: "--debug --output-type deb --version ${{ env.VERSION }} --package defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.deb"

- name: Upload DEB
if: matrix.build == 'linux'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.deb
asset_name: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.deb
asset_content_type: application/octet-stream

- name: Build RPM package
if: matrix.build == 'linux'
uses: bpicode/github-action-fpm@master
with:
fpm_args: "defguard-proxy-${{ github.ref_name }}-${{ matrix.target }}=/usr/bin/defguard-proxy defguard-proxy.service=/usr/lib/systemd/system/defguard-proxy.service example-config.toml=/etc/defguard/proxy.toml"
fpm_opts: "--debug --output-type rpm --version ${{ env.VERSION }} --package defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.rpm"

- name: Upload RPM
if: matrix.build == 'linux'
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.rpm
asset_name: defguard-proxy-${{ env.VERSION }}-${{ matrix.target }}.rpm
asset_content_type: application/octet-stream
Loading