mirror of
https://github.com/lunchcat/sif.git
synced 2026-01-13 13:27:30 -08:00
docs: add comprehensive documentation and fix github actions
- add docs/ with installation, usage, modules, scans, and api docs - add docs link to main readme - fix release.yml to bundle modules directory with releases - add module system tests to runtest.yml - standardize go version to 1.23 across workflows
This commit is contained in:
2
.github/workflows/go.yml
vendored
2
.github/workflows/go.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.24"
|
||||
go-version: "1.23"
|
||||
- name: Build
|
||||
run: make
|
||||
- name: Run tests with coverage
|
||||
|
||||
54
.github/workflows/release.yml
vendored
54
.github/workflows/release.yml
vendored
@@ -40,6 +40,21 @@ jobs:
|
||||
GOOS=linux GOARCH=386 go build -o sif-linux-386 ./cmd/sif
|
||||
GOOS=linux GOARCH=arm64 go build -o sif-linux-arm64 ./cmd/sif
|
||||
|
||||
- name: Package releases with modules
|
||||
run: |
|
||||
for binary in sif-linux-amd64 sif-linux-386 sif-linux-arm64 sif-macos-amd64 sif-macos-arm64; do
|
||||
mkdir -p "dist/${binary}"
|
||||
cp "${binary}" "dist/${binary}/sif"
|
||||
cp -r modules "dist/${binary}/"
|
||||
tar -czf "${binary}.tar.gz" -C dist "${binary}"
|
||||
done
|
||||
for binary in sif-windows-amd64 sif-windows-386; do
|
||||
mkdir -p "dist/${binary}"
|
||||
cp "${binary}.exe" "dist/${binary}/sif.exe"
|
||||
cp -r modules "dist/${binary}/"
|
||||
cd dist && zip -r "../${binary}.zip" "${binary}" && cd ..
|
||||
done
|
||||
|
||||
- name: Set release version
|
||||
run: echo "RELEASE_VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
||||
|
||||
@@ -52,24 +67,35 @@ jobs:
|
||||
Automated release v${{ env.RELEASE_VERSION }}
|
||||
|
||||
## Assets
|
||||
- Windows (64-bit): `sif-windows-amd64.exe`
|
||||
- Windows (32-bit): `sif-windows-386.exe`
|
||||
- macOS (64-bit Intel): `sif-macos-amd64`
|
||||
- macOS (64-bit ARM): `sif-macos-arm64`
|
||||
- Linux (64-bit): `sif-linux-amd64`
|
||||
- Linux (32-bit): `sif-linux-386`
|
||||
- Linux (64-bit ARM): `sif-linux-arm64`
|
||||
|
||||
Each archive contains the sif binary and built-in modules.
|
||||
|
||||
- Windows (64-bit): `sif-windows-amd64.zip`
|
||||
- Windows (32-bit): `sif-windows-386.zip`
|
||||
- macOS (64-bit Intel): `sif-macos-amd64.tar.gz`
|
||||
- macOS (64-bit ARM): `sif-macos-arm64.tar.gz`
|
||||
- Linux (64-bit): `sif-linux-amd64.tar.gz`
|
||||
- Linux (32-bit): `sif-linux-386.tar.gz`
|
||||
- Linux (64-bit ARM): `sif-linux-arm64.tar.gz`
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
tar -xzf sif-linux-amd64.tar.gz
|
||||
cd sif-linux-amd64
|
||||
./sif -h
|
||||
```
|
||||
|
||||
For more details, check the [commit history](https://github.com/${{ github.repository }}/commits/main).
|
||||
draft: false
|
||||
prerelease: false
|
||||
files: |
|
||||
sif-windows-amd64.exe
|
||||
sif-windows-386.exe
|
||||
sif-macos-amd64
|
||||
sif-macos-arm64
|
||||
sif-linux-amd64
|
||||
sif-linux-386
|
||||
sif-linux-arm64
|
||||
sif-windows-amd64.zip
|
||||
sif-windows-386.zip
|
||||
sif-macos-amd64.tar.gz
|
||||
sif-macos-arm64.tar.gz
|
||||
sif-linux-amd64.tar.gz
|
||||
sif-linux-386.tar.gz
|
||||
sif-linux-arm64.tar.gz
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
13
.github/workflows/runtest.yml
vendored
13
.github/workflows/runtest.yml
vendored
@@ -27,3 +27,16 @@ jobs:
|
||||
echo "Sif exited with an error"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Test module system
|
||||
run: |
|
||||
echo "Listing modules..."
|
||||
./sif -lm
|
||||
echo "Running all modules..."
|
||||
./sif -u https://example.com -am
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Module system working"
|
||||
else
|
||||
echo "Module system failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user