Skip to content

Commit

Permalink
Merge pull request #1464 from swagger-api/automation-v1
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma authored Oct 16, 2020
2 parents 45e55dc + 29291de commit 8264879
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/maven-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
server-id: sonatype-nexus-snapshots
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Cache local Maven repository
Expand All @@ -28,14 +28,14 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
- name: Build with Maven, Deploy snapshot to maven central
run: |
mvn -B verify --file pom.xml
mvn --no-transfer-progress -B verify --file pom.xml
export MY_POM_VERSION=`mvn -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
echo "POM VERSION" ${MY_POM_VERSION}
if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
then
mvn -B clean deploy
mvn --no-transfer-progress -B clean deploy
else
echo "not deploying release: " ${MY_POM_VERSION}
fi
Expand Down

0 comments on commit 8264879

Please sign in to comment.