-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (97 loc) · 3.15 KB
/
Copy pathbuild.yml
File metadata and controls
117 lines (97 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Build & Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
target: aarch64-apple-darwin
label: macOS-arm64
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
label: Linux-x86_64
- os: windows-latest
target: x86_64-pc-windows-msvc
label: Windows-x86_64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# -- Python + PyInstaller for sidecar --
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install PyInstaller
run: pip install pyinstaller
- name: Clone sqlmap
run: git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap
working-directory: ${{ github.workspace }}
- name: Build sidecar
run: bash scripts/build-sidecar.sh
env:
SQLMAP_ROOT: ${{ github.workspace }}/sqlmap
shell: bash
- name: Verify sidecar
run: ls -la src-tauri/binaries/
shell: bash
# -- Node + Rust for Tauri --
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- uses: dtolnay/rust-toolchain@stable
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Make sidecar executable
if: runner.os != 'Windows'
run: chmod +x src-tauri/binaries/sqlmap-sidecar-*
- run: pnpm install
- name: Build Tauri app
run: pnpm tauri build
# -- Collect artifacts --
- name: Collect release artifacts
id: artifacts
run: |
mkdir -p release-artifacts
# macOS
cp src-tauri/target/release/bundle/dmg/*.dmg release-artifacts/ 2>/dev/null || true
# Linux
cp src-tauri/target/release/bundle/deb/*.deb release-artifacts/ 2>/dev/null || true
cp src-tauri/target/release/bundle/appimage/*.AppImage release-artifacts/ 2>/dev/null || true
# Windows
cp src-tauri/target/release/bundle/msi/*.msi release-artifacts/ 2>/dev/null || true
cp src-tauri/target/release/bundle/nsis/*.exe release-artifacts/ 2>/dev/null || true
ls -lh release-artifacts/
shell: bash
- uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.label }}
path: release-artifacts/*
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: List all artifacts
run: find artifacts -type f | sort
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/**/*
generate_release_notes: true
draft: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}