Skip to content

Commit

Permalink
Merge pull request #66 from DefGuard/dev
Browse files Browse the repository at this point in the history
Merge dev -> main
  • Loading branch information
t-aleksander authored Jun 25, 2024
2 parents 81c9551 + a07b0e4 commit da6a37c
Show file tree
Hide file tree
Showing 25 changed files with 904 additions and 207 deletions.
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/[email protected]
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/[email protected]
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

0 comments on commit da6a37c

Please sign in to comment.