Skip to content

Commit a1962d1

Browse files
committed
Use the version from tag.
1 parent d792d87 commit a1962d1

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ jobs:
66
publish:
77
runs-on: ubuntu-latest
88
steps:
9+
- name: Get Version from Tag
10+
run: |
11+
echo "VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
12+
echo "VERSION=${GITHUB_REF:11}"
913
- uses: actions/checkout@v2
1014
- name: Set up JDK 11
1115
uses: actions/setup-java@v1
1216
with:
1317
java-version: 11
1418
- name: Publish package
15-
run: ./gradlew publish
19+
run: ./gradlew -Pversion=${VERSION} publish
1620
env:
1721
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
1822
SONATYPE_PWD: ${{ secrets.SONATYPE_PWD }}

build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ java {
1111
withSourcesJar()
1212
}
1313

14-
version = "1.1.0"
1514
group = "org.chenliang.oggus"
1615

1716
repositories {

0 commit comments

Comments
 (0)