Skip to content

Commit 358fa89

Browse files
committed
Fix release script
1 parent 8838e15 commit 358fa89

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
-H "Accept: application/vnd.github+json" \
4242
/repos/${{ github.repository }}/actions/runs?status=success\&head_sha=${{ github.sha }} \
4343
| jq 'limit(1; .workflow_runs[] | select(.name == "Build" and .conclusion == "success"))')"
44-
echo "BUILD_SUCCESS: '$BUILD_SUCCESS'"
4544
if [ -z "$BUILD_SUCCESS" ]; then
4645
echo "Commit did not pass Build!"
4746
exit 1
@@ -57,9 +56,9 @@ jobs:
5756
env:
5857
NEXT_INPUT_VERSION: ${{ inputs.version }}
5958
TAG_NAME: ${{ github.event.release.tag_name }}
60-
shell: bash
6159
run: |
62-
declare -r VERSION="$((git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*' 2>/dev/null || echo "v0.0.0") | cut -c2-)"
60+
declare -r GIT_VERSION="$(git tag -l 'v[0-9]*.[0-9]*.[0-9]*' | tail -n 1 | cut -c2-)"
61+
declare -r VERSION=${GIT_VERSION:-0.0.0}
6362
declare -r MAJOR="$(echo "$VERSION" | cut -d. -f1)"
6463
declare -r MINOR="$(echo "$VERSION" | cut -d. -f2)"
6564
declare -r PATCH="$(echo "$VERSION" | cut -d. -f3)"
@@ -81,7 +80,6 @@ jobs:
8180
env:
8281
PREV_VERSION: ${{ steps.versions.outputs.version }}
8382
NEXT_VERSION: ${{ steps.versions.outputs.next_version }}
84-
shell: bash
8583
run: |
8684
git config user.name "Coditory CI"
8785
git config user.email "Coditory CI <admin@coditory.com>"
@@ -117,7 +115,7 @@ jobs:
117115
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
118116
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
119117
run: |
120-
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion=$NEXT_VERSION -Ppublish
118+
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion=$NEXT_VERSION -Ppublish --info
121119
echo "Published release: $NEXT_VERSION"
122120
123121
- name: Generate release notes

0 commit comments

Comments
 (0)