mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-17 13:11:00 +00:00
feat: add schemas to the release CI
This commit is contained in:
parent
dc43e44020
commit
a304b47fbf
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@ -75,6 +75,16 @@ jobs:
|
|||||||
asset_name: signal-cli-${{ steps.version.outputs.version }}-Linux-client.tar.gz
|
asset_name: signal-cli-${{ steps.version.outputs.version }}-Linux-client.tar.gz
|
||||||
asset_content_type: application/x-compressed-tar # .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:
|
build-container:
|
||||||
needs: release
|
needs: release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@ -18,12 +18,13 @@ fi
|
|||||||
VERSION=$(sed -n 's/\s*version\s*=\s*"\(.*\)".*/\1/p' build.gradle.kts | tail -n1)
|
VERSION=$(sed -n 's/\s*version\s*=\s*"\(.*\)".*/\1/p' build.gradle.kts | tail -n1)
|
||||||
echo "$VERSION" >dist/VERSION
|
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 .
|
$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/**'
|
git clean -Xfd -e '!/dist/' -e '!/dist/**' -e '!/github/' -e '!/github/**'
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
$ENGINE run --pull=never --rm -v "$(pwd)":/signal-cli:Z -e VERSION="$VERSION" $USER signal-cli:build
|
$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/distributions/signal-cli-*.tar.gz dist/
|
||||||
|
mv build/signal-cli-*-json-schemas.tar.gz dist/
|
||||||
|
|
||||||
if [ -n "${OVERRIDE_JAVA_VERSION:-}" ]; then
|
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"
|
echo -e "\e[33mBuild was performed with overridden Java version $OVERRIDE_JAVA_VERSION, native-image and client will not be built.\e[0m"
|
||||||
|
|||||||
@ -12,7 +12,7 @@ reset_file_dates
|
|||||||
|
|
||||||
if [ "$1" == "build" ]; then
|
if [ "$1" == "build" ]; then
|
||||||
|
|
||||||
./gradlew build \
|
./gradlew build jsonSchemas \
|
||||||
--no-daemon \
|
--no-daemon \
|
||||||
--max-workers=1 \
|
--max-workers=1 \
|
||||||
-Dkotlin.compiler.execution.strategy=in-process \
|
-Dkotlin.compiler.execution.strategy=in-process \
|
||||||
@ -20,6 +20,12 @@ if [ "$1" == "build" ]; then
|
|||||||
-Dorg.gradle.caching=false \
|
-Dorg.gradle.caching=false \
|
||||||
-Porg.gradle.java.installations.auto-download=false \
|
-Porg.gradle.java.installations.auto-download=false \
|
||||||
-Porg.gradle.java.installations.auto-detect=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
|
cd man
|
||||||
make install
|
make install
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user