Fix github actions workflow

This commit is contained in:
Andrea Cavalli 2021-10-22 13:24:19 +02:00
parent 9d8dd57d7f
commit 94e7a682bd
3 changed files with 33 additions and 1 deletions

View File

@ -35,13 +35,19 @@ jobs:
echo "REVISION=$REVISION" >> $GITHUB_ENV
echo "IMPLEMENTATION_NAME=$IMPLEMENTATION_NAME" >> $GITHUB_ENV
- name: Set up JDK 17
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: actions/setup-java@v1
with:
java-version: 17
server-id: mchv-release-distribution
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
shell: bash
run: |
echo "IMPLEMENTATION_NAME: $IMPLEMENTATION_NAME"
source ./scripts/continuous-integration/github-workflows/only-compile-release.sh
- name: Deploy to Maven (Release)
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
shell: bash

View File

@ -0,0 +1,10 @@
#!/bin/bash -e
set -e
# OTHER REQUIRED ENVIRONMENT VARIABLES:
# IMPLEMENTATION_NAME = <tdlib | tdlight>
cd ./scripts/core/
./only_compile_release.sh
echo "Done."
exit 0

View File

@ -0,0 +1,16 @@
#!/bin/bash -e
# OTHER REQUIRED ENVIRONMENT VARIABLES:
# IMPLEMENTATION_NAME = <tdlib | tdlight>
# Check variables correctness
if [ -z "${IMPLEMENTATION_NAME}" ]; then
echo "Missing parameter: IMPLEMENTATION_NAME"
exit 1
fi
cd ../../${IMPLEMENTATION_NAME}
mvn -B clean package --file pom.xml
echo "Done."
exit 0