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
19 changes: 19 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,22 @@ jobs:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} # Central Portal token
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Extract version and create tag
run: |
VERSION=$(sed -n 's/^[[:space:]]*<version>\([^<]*\)<\/version>/\1/p' pom.xml | head -1)

[ -n "$VERSION" ] || exit 1

git tag "$VERSION" 2>/dev/null || echo "Tag already exists"
git push origin "$VERSION" || true

- name: Notify slack releases channel
uses: slackapi/slack-github-action@v2
with:
webhook: ${{ secrets.SLACK_RELEASES_PROD_WEBHOOK_URL }}
webhook-type: webhook-trigger
payload: |
status: "${{ job.status }}"
environment: "PRODUCTION"
project: "LexFloatClient Java"
36 changes: 20 additions & 16 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@ on:
jobs:
update-version:
runs-on: ubuntu-latest
env:
LIBRARY_VERSION: ${{ github.event.inputs.libraryVersion }}
PACKAGE_VERSION: ${{ github.event.inputs.packageVersion }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create new branch
run: git checkout -b release/${{ github.event.inputs.packageVersion }}
uses: actions/checkout@v4

- 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 [email protected]
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
sed -i -E 's/^([[:space:]]*)VERSION="[^"]*"/\1VERSION="v${{ env.LIBRARY_VERSION }}"/' ./download-libs.sh
sed -i '/<packaging>jar<\/packaging>/,/<name>/s/<version>[^<]*<\/version>/<version>${{ env.LIBRARY_VERSION }}<\/version>/' pom.xml

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: ci/${{ env.PACKAGE_VERSION }}
title: "chore: bump package version to ${{ env.PACKAGE_VERSION }}"
commit-message: "chore(package version): updated version"
body: |
Automated package version bump.
base: master
add-paths: |
./download-libs.sh
pom.xml