diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 05dca5a..647631f 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -2,37 +2,9 @@ name: Maven Publish on: workflow_dispatch: - inputs: - libraryVersion: - description: 'Library Version' - required: true - default: '' - packageVersion: - description: 'Package Version' - required: true - default: '' jobs: - update-version: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Update Version - run: | - sed -i '/VERSION=/!b;cVERSION=\"v${{ github.event.inputs.libraryVersion }}";' ./download-libs.sh - - name: Commit, Tag and Push - run: | - git add ./download-libs.sh - git config user.name github-actions - git config user.email github-actions@github.com - git commit -m "updated version" | exit 0 - git tag ${{ github.event.inputs.packageVersion }} - git push & git push --tags - publish: - needs: update-version runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -56,11 +28,8 @@ jobs: - name: Check Maven version run: mvn -version - - name: Update Version in pom.xml - run: mvn -B versions:set -DnewVersion=${{ github.event.inputs.packageVersion }} -DgenerateBackupPoms=false - - name: Publish to Central Portal - run: mvn -B -e clean deploy -Pdeploy -Drevision=${{ github.event.inputs.packageVersion }} + run: mvn -B -e clean deploy -Pdeploy env: MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} # Central Portal token diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml new file mode 100644 index 0000000..5cadb4e --- /dev/null +++ b/.github/workflows/update-version.yml @@ -0,0 +1,38 @@ +name: Update version + +on: + workflow_dispatch: + inputs: + libraryVersion: + description: 'Library Version' + required: true + default: '' + packageVersion: + description: 'Package Version' + required: true + default: '' + +jobs: + update-version: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Create new branch + run: git checkout -b release/${{ github.event.inputs.packageVersion }} + + - name: Update Version + run: | + sed -i '/VERSION=/!b;cVERSION=\"v${{ github.event.inputs.libraryVersion }}";' ./download-libs.sh + sed -i '/jar<\/packaging>/,//s/[^<]*<\/version>/${{ github.event.inputs.libraryVersion }}<\/version>/' pom.xml + - name: Commit, Tag and Push + run: | + git add ./download-libs.sh + git add pom.xml + git config user.name github-actions + git config user.email github-actions@github.com + git commit -m "chore(package version): updated version" | exit 0 + git tag ${{ github.event.inputs.packageVersion }} + git push --set-upstream origin release/${{ github.event.inputs.packageVersion }} + git push --tags diff --git a/pom.xml b/pom.xml index cf47b06..f4c5114 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ - Cryptlex, LLC + Cryptlex LLP https://cryptlex.com @@ -26,7 +26,7 @@ Cryptlex Team support@cryptlex.com - Cryptlex, LLC + Cryptlex LLP https://cryptlex.com @@ -89,7 +89,8 @@ central true true - published + + validated