Update github actions

This commit is contained in:
Andrea Cavalli 2023-05-09 20:44:04 +02:00
parent 36a6e90335
commit 84228cfbf2

View File

@ -18,11 +18,12 @@ jobs:
id: branch_name
run: |
set -xeo pipefail
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
echo ::set-output name=SOURCE_TAG_VERSION::${GITHUB_REF#refs/tags/v}
- uses: actions/checkout@v2
echo "SOURCE_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "SOURCE_TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
cat $GITHUB_ENV > github.env
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Setup variables
@ -31,10 +32,8 @@ jobs:
set -xeo pipefail
# ====== Variables
export REVISION=${{ steps.branch_name.outputs.SOURCE_TAG_VERSION }}
export SSL_TYPE=${{ matrix.ssl }}
echo "REVISION=$REVISION" >> $GITHUB_ENV
echo "SSL_TYPE=$SSL_TYPE" >> $GITHUB_ENV
- name: Set up JDK 17 (Snapshot)
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/setup-java@v3
@ -46,11 +45,10 @@ jobs:
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build and deploy to Maven (Snapshot)
if: ${{ !startsWith(github.ref, 'refs/tags/v') && matrix.ssl == 'ssl1' }}
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
shell: bash
run: |
set -xeo pipefail
echo "SSL_TYPE: $SSL_TYPE"
mvn -B -f bom/pom.xml -P "java8,java17" clean deploy
echo "Done."
@ -73,7 +71,6 @@ jobs:
run: |
set -xeo pipefail
echo "REVISION: $REVISION"
echo "SSL_TYPE: $SSL_TYPE"
mvn -B -f bom/pom.xml -Drevision="${REVISION}" -P "java8,java17" clean deploy
echo "Done."