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
31 changes: 25 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
tags:
- v*.*.*
env:
SQLX_OFFLINE: "1"

jobs:
create-release:
Expand All @@ -24,6 +26,7 @@ jobs:
uses: ./.github/workflows/sbom.yml
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}

ubuntu-22-04-build:
needs:
- create-release
Expand All @@ -50,25 +53,25 @@ jobs:
RUSTUP_HOME: /root/.rustup
CARGO_HOME: /root/.cargo
steps:
- name: git install
- name: Install system packages
run: |
apt-get update
apt-get install -y git curl ca-certificates
apt-get install -y git curl ca-certificates libatomic1
git config --global --add safe.directory '*'
- uses: actions/checkout@v6
with:
submodules: recursive

- uses: actions/setup-node@v6
with:
node-version: 26

- name: Install pnpm
uses: pnpm/action-setup@v6
with:
cache: true
version: 11

- uses: actions/setup-node@v6
with:
node-version: 26

- name: Get pnpm store directory
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> ${GITHUB_ENV}
Expand Down Expand Up @@ -275,6 +278,22 @@ jobs:
asset_name: defguard-service-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
asset_content_type: application/octet-stream

- name: Rename and tar defguard-cli binary
run: |
mv src-tauri/target/release/defguard-cli defguard-cli-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
tar -zcf defguard-cli-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz \
defguard-cli-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}

- name: Upload defguard-cli archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: defguard-cli-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
asset_name: defguard-cli-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}.tar.gz
asset_content_type: application/octet-stream

- name: Rename and tar dg binary
run: |
mv src-tauri/target/release/dg dg-linux-${{ matrix.binary_arch }}-${{ github.ref_name }}
Expand Down
2 changes: 2 additions & 0 deletions nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ in
cargo-nextest
vtsls
trivy
desktop-file-utils
xdg-utils
];

shellHook = with pkgs; ''
Expand Down
Loading