wocommunity / wonder

Project Wonder
http://wiki.wocommunity.org/
239 stars 166 forks source link

Github action workflow to generate Maven Release and deploy it, and then generate Snapshot to work locally? #993

Closed caosDvlp closed 2 years ago

caosDvlp commented 2 years ago

I'm new in this devops world. I'm building a Java SprinBoot API with maven. I'm building my yml file to develop the worfklow so when I push a change in my main branch then the workflow can execute and deploy a new release version in my Artifactory repository.

I want to deploy a new Release version in artifactory, but also change my local pom.xml project version to a SNAPSHOT at the sime time. Here is the part of my workflow where I create the Snapshot version and then the deploy, I know is not complete, but I don't know how to do the 2 steps.

` - name: Increment Version run: | chmod +x mvnw ./mvnw build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0-SNAPSHOT versions:commit git config user.name "GitHub Action" git config user.email "action@github.com" git add . git commit -m "updated version in pom.xml" git push