mirror of
https://github.com/hpd840321/craftlabs-authorization-sdk.git
synced 2026-06-09 10:00:30 +08:00
feat(sdk): AuthConfigs, JSON Schema, examples, and release checksum CI
Add craftlabs-auth-config.schema.json, Java AuthConfigs model with tests, example configs aligned to BP-10, C/Java/auth-config documentation, native header notes, RELEASING guide, and workflow to verify SDK artifact checksums on release tags. Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
# 手动触发:打包 SDK + Native(.so) 并生成 SHA256SUMS,供 GitHub Release 上传
|
||||
name: sdk-release-checksums
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
checksums:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "17"
|
||||
cache: maven
|
||||
- name: Install native build deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential cmake
|
||||
- name: Build native (.so)
|
||||
run: |
|
||||
cmake -S native -B native/build -DCMAKE_BUILD_TYPE=Release -DCRAFTLABS_BUILD_JNI=ON
|
||||
cmake --build native/build --parallel
|
||||
- name: Maven package (SDK jars)
|
||||
run: mvn -f java/pom.xml -B -DskipTests package
|
||||
- name: Generate SHA256SUMS
|
||||
run: |
|
||||
chmod +x scripts/sdk-release-checksums.sh
|
||||
./scripts/sdk-release-checksums.sh --no-mvn --output dist/sdk-release --native-path "${{ github.workspace }}/native/build"
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sdk-release-${{ github.ref_name }}
|
||||
path: |
|
||||
dist/sdk-release/
|
||||
java/craftlabs-auth-core/target/*.jar
|
||||
java/craftlabs-auth-bitanswer/target/*.jar
|
||||
java/craftlabs-auth-selfhosted/target/*.jar
|
||||
Reference in New Issue
Block a user