diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 621581f9..cfec06ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/reproducible-builds/build.sh b/reproducible-builds/build.sh index 2a46edaa..1fd5909a 100755 --- a/reproducible-builds/build.sh +++ b/reproducible-builds/build.sh @@ -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" diff --git a/reproducible-builds/entrypoint.sh b/reproducible-builds/entrypoint.sh index 5aa521d2..5ad8f9f9 100644 --- a/reproducible-builds/entrypoint.sh +++ b/reproducible-builds/entrypoint.sh @@ -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 ..