Update version #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| env: | |
| LIBRARY_VERSION: ${{ github.event.inputs.libraryVersion }} | |
| PACKAGE_VERSION: ${{ github.event.inputs.packageVersion }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Update Version | |
| run: | | |
| 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 |