完成 1.0.0 首发审计与安全加固
This commit is contained in:
1 parent
357b3aa65d
commit
d0d8096663
49 files changed
+1760
-298
No files matched your search
@@ -8,11 +8,6 @@ on:
|
||||
- "v*.*.*"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Tag version with a v prefix, for example v0.0.1
|
||||
required: true
|
||||
default: v0.0.1
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -33,8 +28,8 @@ jobs:
|
||||
name: Resolve release version
|
||||
shell: bash
|
||||
env:
|
||||
RAW_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.version || startsWith(github.ref, 'refs/tags/') && github.ref_name || 'v0.0.0' }}
|
||||
RELEASE_BUILD: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') }}
|
||||
RAW_VERSION: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || 'v1.0.0' }}
|
||||
RELEASE_BUILD: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
run: |
|
||||
if [ "$RELEASE_BUILD" = "true" ] && [[ ! "$RAW_VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||
echo "Tag must use the v-prefixed format v1.2.3" >&2
|
||||
@@ -132,6 +127,8 @@ jobs:
|
||||
run: CARGO_TARGET_DIR=target/backend cargo test --locked --manifest-path backend/Cargo.toml
|
||||
- name: Test Agent
|
||||
run: CARGO_TARGET_DIR=target/agent cargo test --locked --manifest-path agent/Cargo.toml
|
||||
- name: Build Agent for smoke test
|
||||
run: CARGO_TARGET_DIR=target/agent cargo build --locked --manifest-path agent/Cargo.toml
|
||||
- name: Build backend
|
||||
run: CARGO_TARGET_DIR=target/backend cargo build --locked --manifest-path backend/Cargo.toml
|
||||
- name: Smoke test SQLite and PostgreSQL
|
||||
@@ -180,6 +177,7 @@ jobs:
|
||||
MONITOR_BASE_URL=http://127.0.0.1:18080 \
|
||||
MONITOR_ADMIN_USERNAME=sqlite-smoke \
|
||||
MONITOR_ADMIN_PASSWORD=SmokePassword123 \
|
||||
MONITOR_AGENT_BINARY="$GITHUB_WORKSPACE/target/agent/debug/nodeflare-agent" \
|
||||
MONITOR_MIGRATION_URL="$POSTGRES_URL" \
|
||||
MONITOR_MIGRATION_KIND=postgresql \
|
||||
sh scripts/smoke-test.sh
|
||||
@@ -207,6 +205,7 @@ jobs:
|
||||
MONITOR_BASE_URL=http://127.0.0.1:18081 \
|
||||
MONITOR_ADMIN_USERNAME=sqlite-smoke \
|
||||
MONITOR_ADMIN_PASSWORD=SmokePassword123 \
|
||||
MONITOR_AGENT_BINARY="$GITHUB_WORKSPACE/target/agent/debug/nodeflare-agent" \
|
||||
sh scripts/smoke-test.sh
|
||||
|
||||
server:
|
||||
@@ -752,8 +751,9 @@ jobs:
|
||||
cp -a inputs/frontend/unpacked/admin-dist/. package/share/admin/
|
||||
cp agent/agent.sh agent/install-macos.sh agent/install-freebsd.sh agent/install.ps1 package/share/agent/
|
||||
cp deploy/nodeflare.service package/nodeflare.service
|
||||
cp LICENSE package/LICENSE
|
||||
chmod 0755 "package/$PACKAGE_BINARY" package/share/agent/*.sh
|
||||
chmod 0644 package/nodeflare.service package/share/agent/install.ps1
|
||||
chmod 0644 package/LICENSE package/nodeflare.service package/share/agent/install.ps1
|
||||
if [ "$FORMAT" = zip ]; then
|
||||
(cd package && zip -qr "../release/$ASSET" .)
|
||||
unzip -tq "release/$ASSET"
|
||||
|
||||
Reference in new issue
Block a user