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
125 changes: 0 additions & 125 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,6 @@ jobs:
asset_path: dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}_ubuntu-22-04-lts.deb
asset_name: dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}_ubuntu-22-04-lts.deb
asset_content_type: application/octet-stream
- name: Install ruby with deb-s3
if: matrix.build != 'freebsd'
run: |
apt-get install -y ruby
gem install deb-s3
echo "$(ruby -r rubygems -e 'puts Gem.user_dir')/bin" >> $GITHUB_PATH
- name: Upload DEB to APT repository
run: |
COMPONENT=$([[ "${{ github.ref_name }}" == *"-"* ]] && echo "pre-release" || echo "release") # if tag contain "-" assume it's pre-release.

deb-s3 upload -l --bucket=apt.defguard.net --access-key-id=${{ secrets.AWS_ACCESS_KEY_APT }} --secret-access-key=${{ secrets.AWS_SECRET_KEY_APT }} --s3-region=eu-north-1 --no-fail-if-exists --codename=bookworm --component="$COMPONENT" src-tauri/target/release/bundle/deb/defguard-client_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
deb-s3 upload -l --bucket=apt.defguard.net --access-key-id=${{ secrets.AWS_ACCESS_KEY_APT }} --secret-access-key=${{ secrets.AWS_SECRET_KEY_APT }} --s3-region=eu-north-1 --no-fail-if-exists --codename=bookworm --component="$COMPONENT" dg-linux-${{ env.VERSION }}_${{ matrix.deb_arch }}_ubuntu-22-04-lts.deb

build-linux:
needs:
Expand Down Expand Up @@ -216,16 +204,6 @@ jobs:
asset_path: src-tauri/target/release/bundle/deb/defguard-client_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
asset_name: defguard-client_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
asset_content_type: application/octet-stream
- name: Install ruby with deb-s3
if: matrix.build != 'freebsd'
run: |
sudo apt-get install -y ruby
gem install deb-s3
echo "$(ruby -r rubygems -e 'puts Gem.user_dir')/bin" >> $GITHUB_PATH
- name: Upload DEB to APT repository #Add this to ubuntu 22.04 job (on merge dev -> main) with --codename=bookworm
run: |
COMPONENT=$([[ "${{ github.ref_name }}" == *"-"* ]] && echo "pre-release" || echo "release") # if tag contain "-" assume it's pre-release.
deb-s3 upload -l --bucket=apt.defguard.net --access-key-id=${{ secrets.AWS_ACCESS_KEY_APT }} --secret-access-key=${{ secrets.AWS_SECRET_KEY_APT }} --s3-region=eu-north-1 --no-fail-if-exists --codename=trixie --component="$COMPONENT" src-tauri/target/release/bundle/deb/defguard-client_${{ env.VERSION }}_${{ matrix.deb_arch }}.deb
- name: Rename client binary
run: mv src-tauri/target/release/defguard-client defguard-client-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
- name: Tar client binary
Expand Down Expand Up @@ -310,109 +288,6 @@ jobs:
asset_name: dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.rpm
asset_content_type: application/octet-stream

apt-sign:
needs:
- build-linux
- ubuntu-22-04-build
runs-on:
- self-hosted
- Linux
- X64
steps:
- name: Sign APT repository
run: |
export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_APT }}
export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_KEY_APT }}
export AWS_REGION=eu-north-1
sudo apt update -y
sudo apt install -y awscli curl jq

for DIST in trixie bookworm; do
aws s3 cp s3://apt.defguard.net/dists/${DIST}/Release .

curl -X POST "${{ secrets.DEFGUARD_SIGNING_URL }}?signature_type=both" \
-H "Authorization: Bearer ${{ secrets.DEFGUARD_SIGNING_API_KEY }}" \
-F "file=@Release" \
-o response.json

cat response.json | jq -r '.files["Release.gpg"].content' | base64 --decode > Release.gpg
cat response.json | jq -r '.files.Release.content' | base64 --decode > InRelease

aws s3 cp Release.gpg s3://apt.defguard.net/dists/${DIST}/ --acl public-read
aws s3 cp InRelease s3://apt.defguard.net/dists/${DIST}/ --acl public-read

done
(aws s3 ls s3://apt.defguard.net/dists/ --recursive; aws s3 ls s3://apt.defguard.net/pool/ --recursive) | awk '{print "<a href=\""$4"\">"$4"</a><br>"}' > index.html
aws s3 cp index.html s3://apt.defguard.net/ --acl public-read

update-aur:
needs:
- create-release
- build-linux
if: "!contains(github.ref_name, '-')"
runs-on:
- self-hosted
- Linux
- ${{ matrix.architecture }}
container: archlinux:latest
strategy:
fail-fast: false
matrix:
architecture: [X64]
include:
- architecture: X64
deb_arch: amd64
binary_arch: x86_64
steps:
- name: Install dependencies
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm git openssh base-devel
- name: Setup SSH for AUR
run: |
mkdir -p ~/.ssh
echo "${{ secrets.AUR_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
# Create SSH config file
cat > ~/.ssh/config << EOF
Host aur.archlinux.org
IdentityFile ~/.ssh/id_rsa
User aur
StrictHostKeyChecking accept-new
EOF
chmod 600 ~/.ssh/config
- name: Update AUR Package
run: |

git config --global user.name "Defguard Build System"
git config --global user.email "community@defguard.net"
git config --global --add safe.directory '*'

rm -rf aur-repo || true
GIT_SSH_COMMAND="ssh -v -i ~/.ssh/id_rsa -o StrictHostKeyChecking=accept-new" \
git clone "ssh://aur@aur.archlinux.org/defguard-client.git" aur-repo
cd aur-repo
git config --global --add safe.directory "$(pwd)"
VERSION=$(echo ${GITHUB_REF_NAME#v} | cut -d '-' -f1)
echo "Updating to version: $VERSION"
sed -i "s/^pkgver=.*/pkgver=$VERSION/" PKGBUILD

AMD64_SHA="${{ needs.build-linux.outputs.deb_sha256_amd64 }}"
echo "AMD64 DEB SHA256: $AMD64_SHA"
sed -i "s/^sha256sums_x86_64=.*/sha256sums_x86_64=('$AMD64_SHA')/" PKGBUILD

useradd -m builduser
chown -R builduser:builduser .

su builduser -c "makepkg --printsrcinfo" > .SRCINFO
git add PKGBUILD .SRCINFO
git commit -m "Updated to $VERSION"
GIT_SSH_COMMAND="ssh -v -i ~/.ssh/id_rsa -o StrictHostKeyChecking=accept-new" git push
cat PKGBUILD
cat .SRCINFO

# Builds Windows MSI and uploads it as artifact
build-windows:
needs:
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@
"@react-hook/resize-observer": "^2.0.2",
"@stablelib/base64": "^2.0.1",
"@stablelib/x25519": "^2.0.1",
"@tanstack/query-core": "^5.90.14",
"@tanstack/query-core": "^5.90.16",
"@tanstack/react-virtual": "3.13.13",
"@tauri-apps/api": "^2.9.1",
"@tauri-apps/plugin-clipboard-manager": "^2.3.2",
"@tauri-apps/plugin-deep-link": "^2.4.5",
"@tauri-apps/plugin-dialog": "^2.4.2",
"@tauri-apps/plugin-fs": "^2.4.4",
"@tauri-apps/plugin-http": "^2.5.4",
"@tauri-apps/plugin-log": "^2.7.1",
"@tauri-apps/plugin-deep-link": "^2.4.6",
"@tauri-apps/plugin-dialog": "^2.5.0",
"@tauri-apps/plugin-fs": "^2.4.5",
"@tauri-apps/plugin-http": "^2.5.5",
"@tauri-apps/plugin-log": "^2.8.0",
"@tauri-apps/plugin-notification": "^2.3.3",
"@tauri-apps/plugin-opener": "^2.5.2",
"@tauri-apps/plugin-opener": "^2.5.3",
"@tauri-apps/plugin-os": "^2.3.2",
"@tauri-apps/plugin-process": "^2.3.1",
"@tauri-apps/plugin-window-state": "^2.4.1",
Expand All @@ -88,20 +88,20 @@
"lodash-es": "^4.17.22",
"merge-refs": "^2.0.0",
"millify": "^6.1.0",
"motion": "^12.23.26",
"motion": "^12.25.0",
"p-timeout": "^6.1.4",
"prop-types": "^15.8.1",
"radash": "^12.1.1",
"react": "^19.2.3",
"react-auth-code-input": "^3.2.1",
"react-click-away-listener": "^2.4.0",
"react-dom": "^19.2.3",
"react-hook-form": "^7.69.0",
"react-hook-form": "^7.70.0",
"react-hotkeys-hook": "^5.2.1",
"react-loading-skeleton": "^3.5.0",
"react-markdown": "^10.1.0",
"react-qr-code": "^2.0.18",
"react-router-dom": "^6.30.2",
"react-router-dom": "^6.30.3",
"react-use-websocket": "^4.13.0",
"react-virtualized-auto-sizer": "^1.0.26",
"recharts": "^3.6.0",
Expand All @@ -112,10 +112,10 @@
"zustand": "^5.0.9"
},
"devDependencies": {
"@biomejs/biome": "^2.3.10",
"@biomejs/biome": "^2.3.11",
"@hookform/devtools": "^4.4.0",
"@svgr/cli": "^8.1.0",
"@tanstack/react-query": "^5.90.14",
"@tanstack/react-query": "^5.90.16",
"@tanstack/react-query-devtools": "^5.91.2",
"@tauri-apps/cli": "^2.9.6",
"@types/file-saver": "^2.0.7",
Expand All @@ -133,7 +133,7 @@
"typedoc": "^0.28.15",
"typesafe-i18n": "^5.26.2",
"typescript": "^5.9.3",
"vite": "^7.3.0"
"vite": "^7.3.1"
},
"volta": {
"node": "20.5.1"
Expand Down
Loading