diff --git a/.github/workflows/build-and-publish_library.yml b/.github/workflows/build-and-publish_library.yml index 1159a9e..8d209b8 100644 --- a/.github/workflows/build-and-publish_library.yml +++ b/.github/workflows/build-and-publish_library.yml @@ -1,9 +1,9 @@ name: Build and Publish Library on: - pull_request: - types: [ closed ] - branches: [ develop, master ] + push: + branches: + - master permissions: contents: write @@ -88,24 +88,13 @@ jobs: - name: Determine version id: determine_version run: | - if [[ "${{ github.base_ref }}" == "develop" ]]; then LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") MAJOR=$(echo $LAST_TAG | cut -d. -f1) MINOR=$(echo $LAST_TAG | cut -d. -f2) PATCH=$(echo $LAST_TAG | cut -d. -f3) NEW_VERSION="${MAJOR}.${MINOR}.$((PATCH + 1))" - echo "version=${NEW_VERSION}-SNAPSHOT" >> $GITHUB_OUTPUT - echo "env=development" >> $GITHUB_OUTPUT - elif [[ "${{ github.base_ref }}" == "master" ]]; then - LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") - VERSION=${LAST_TAG#v} - MAJOR=$(echo $VERSION | cut -d. -f1) - MINOR=$(echo $VERSION | cut -d. -f2) - PATCH=$(echo $VERSION | cut -d. -f3) - NEW_VERSION="${MAJOR}.${MINOR}.$((PATCH + 1))" echo "version=${NEW_VERSION}" >> $GITHUB_OUTPUT - echo "env=production" >> $GITHUB_OUTPUT - fi + echo "env=prod" >> $GITHUB_OUTPUT - name: Display version run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b179b1..3b148af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* 5.1.7: + * **PACKAGE** :sparkler: : Fix build workflow + * 5.1.6.RELEASE.20240724: * **PACKAGE** :sparkler: : Fix build workflow diff --git a/build.gradle b/build.gradle index e3328c1..ce804fd 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'dev.root101.commons' -version = '5.1.6.RELEASE.20240724' +version = '5.1.7' def environment = System.getenv('ENVIRONMENT') ?: 'prod'