Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 1 addition & 32 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -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 '/<packaging>jar<\/packaging>/,/<name>/s/<version>[^<]*<\/version>/<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
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
</licenses>

<organization>
<name>Cryptlex, LLC</name>
<name>Cryptlex LLP</name>
<url>https://cryptlex.com</url>
</organization>

<developers>
<developer>
<name>Cryptlex Team</name>
<email>support@cryptlex.com</email>
<organization>Cryptlex, LLC</organization>
<organization>Cryptlex LLP</organization>
<organizationUrl>https://cryptlex.com</organizationUrl>
</developer>
</developers>
Expand Down Expand Up @@ -89,7 +89,8 @@
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<tokenAuth>true</tokenAuth>
<waitUntil>published</waitUntil>
<!-- Wait until artifacts are uploaded and validated, then let publishing complete asynchronously. -->
<waitUntil>validated</waitUntil>
</configuration>
</plugin>

Expand Down