Skip to content

Commit 9398ab7

Browse files
dariuszkucsmyrick
authored andcommitted
[build] attempt to explicitly read tag version (#554)
1 parent 6c3c518 commit 9398ab7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v2
1313
- uses: gradle/wrapper-validation-action@v1
14-
- name: Get the release version
15-
id: tag
16-
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
1714
- name: Set up Java 1.8
1815
uses: actions/setup-java@v1
1916
# dokka doesn't support Java 11
@@ -29,7 +26,10 @@ jobs:
2926
- name: Build library with Gradle
3027
run: ./gradlew clean build
3128
- name: Publish library with Gradle
32-
run: ./gradlew publish -Pversion=${{ steps.tag.outputs.result }}
29+
run: |
30+
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
31+
echo "New version: ${NEW_VERSION}"
32+
./gradlew publish -Pversion=${NEW_VERSION}
3333
env:
3434
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
3535
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

0 commit comments

Comments
 (0)