|
41 | 41 | -H "Accept: application/vnd.github+json" \ |
42 | 42 | /repos/${{ github.repository }}/actions/runs?status=success\&head_sha=${{ github.sha }} \ |
43 | 43 | | jq 'limit(1; .workflow_runs[] | select(.name == "Build" and .conclusion == "success"))')" |
44 | | - echo "BUILD_SUCCESS: '$BUILD_SUCCESS'" |
45 | 44 | if [ -z "$BUILD_SUCCESS" ]; then |
46 | 45 | echo "Commit did not pass Build!" |
47 | 46 | exit 1 |
|
57 | 56 | env: |
58 | 57 | NEXT_INPUT_VERSION: ${{ inputs.version }} |
59 | 58 | TAG_NAME: ${{ github.event.release.tag_name }} |
60 | | - shell: bash |
61 | 59 | 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} |
63 | 62 | declare -r MAJOR="$(echo "$VERSION" | cut -d. -f1)" |
64 | 63 | declare -r MINOR="$(echo "$VERSION" | cut -d. -f2)" |
65 | 64 | declare -r PATCH="$(echo "$VERSION" | cut -d. -f3)" |
|
81 | 80 | env: |
82 | 81 | PREV_VERSION: ${{ steps.versions.outputs.version }} |
83 | 82 | NEXT_VERSION: ${{ steps.versions.outputs.next_version }} |
84 | | - shell: bash |
85 | 83 | run: | |
86 | 84 | git config user.name "Coditory CI" |
87 | 85 | git config user.email "Coditory CI <admin@coditory.com>" |
@@ -117,7 +115,7 @@ jobs: |
117 | 115 | NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} |
118 | 116 | NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} |
119 | 117 | run: | |
120 | | - ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion=$NEXT_VERSION -Ppublish |
| 118 | + ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion=$NEXT_VERSION -Ppublish --info |
121 | 119 | echo "Published release: $NEXT_VERSION" |
122 | 120 |
|
123 | 121 | - name: Generate release notes |
|
0 commit comments