diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c1ee0173..2b4d815f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,6 +3,8 @@ on: push: tags: - v*.*.* +env: + SQLX_OFFLINE: "1" jobs: create-release: @@ -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 @@ -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} @@ -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 }} diff --git a/nix/shell.nix b/nix/shell.nix index a5f50f15..836d01ec 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -52,6 +52,8 @@ in cargo-nextest vtsls trivy + desktop-file-utils + xdg-utils ]; shellHook = with pkgs; ''