feat: add schemas to the release CI

This commit is contained in:
Era Dorta 2026-05-04 15:30:52 +01:00
parent dc43e44020
commit a304b47fbf
3 changed files with 19 additions and 2 deletions

View File

@ -75,6 +75,16 @@ jobs:
asset_name: signal-cli-${{ steps.version.outputs.version }}-Linux-client.tar.gz
asset_content_type: application/x-compressed-tar # .tar.gz
- name: Upload JSON schemas archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: signal-cli-${{ steps.version.outputs.version }}-json-schemas.tar.gz
asset_name: signal-cli-${{ steps.version.outputs.version }}-json-schemas.tar.gz
asset_content_type: application/x-compressed-tar # .tar.gz
build-container:
needs: release
runs-on: ubuntu-latest

View File

@ -18,12 +18,13 @@ fi
VERSION=$(sed -n 's/\s*version\s*=\s*"\(.*\)".*/\1/p' build.gradle.kts | tail -n1)
echo "$VERSION" >dist/VERSION
# Build jar
# Build jar and schemas
$ENGINE build -t signal-cli:build ${OVERRIDE_JAVA_VERSION:+--build-arg ZULU_TAG=$OVERRIDE_JAVA_VERSION} -f reproducible-builds/build.Containerfile .
git clean -Xfd -e '!/dist/' -e '!/dist/**' -e '!/github/' -e '!/github/**'
# shellcheck disable=SC2086
$ENGINE run --pull=never --rm -v "$(pwd)":/signal-cli:Z -e VERSION="$VERSION" $USER signal-cli:build
mv build/distributions/signal-cli-*.tar.gz dist/
mv build/signal-cli-*-json-schemas.tar.gz dist/
if [ -n "${OVERRIDE_JAVA_VERSION:-}" ]; then
echo -e "\e[33mBuild was performed with overridden Java version $OVERRIDE_JAVA_VERSION, native-image and client will not be built.\e[0m"

View File

@ -12,7 +12,7 @@ reset_file_dates
if [ "$1" == "build" ]; then
./gradlew build \
./gradlew build jsonSchemas \
--no-daemon \
--max-workers=1 \
-Dkotlin.compiler.execution.strategy=in-process \
@ -20,6 +20,12 @@ if [ "$1" == "build" ]; then
-Dorg.gradle.caching=false \
-Porg.gradle.java.installations.auto-download=false \
-Porg.gradle.java.installations.auto-detect=false
schemas_tar="build/signal-cli-${VERSION}-json-schemas.tar"
reset_file_dates
tar --sort=name --mtime="@$SOURCE_DATE_EPOCH" --owner=0 --group=0 --numeric-owner -cf "$schemas_tar" -C build/generated/META-INF/schemas .
gzip -n -9 "$schemas_tar"
cd man
make install
cd ..