Skip to content

add echo

add echo #26

Workflow file for this run

name: Maven Build and Deploy
on:
push:
branches:
- master
- '**/v**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
- name: Echo GITHUB_REF
run: echo "GITHUB_REF is ${GITHUB_REF}"
- name: Determine if this is a tag
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
echo "This is a tag.";
else
echo "This is not a tag.";
fi
- name: Build and Deploy with Maven
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
echo "------- Maven Deploy release on ${{ github.event_name }} -------";
mvn -B -e -f pom.xml clean deploy -P release-sign-artifacts --settings maven-settings.xml
else
echo "------- Maven Deploy snapshot on ${{ github.event_name }} -------";
mvn -B -e -f pom.xml clean deploy --settings maven-settings.xml
fi