Skip to content

Commit 59bf42c

Browse files
committed
Use project.version to pass versions
1 parent 1747256 commit 59bf42c

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

.github/workflows/release.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Create release
33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- '*'
77

88
jobs:
99
publish:
@@ -25,16 +25,12 @@ jobs:
2525
- id: vars
2626
run: |
2727
echo ::set-output name=tag::${GITHUB_REF:10}
28-
echo ::set-output name=version::${GITHUB_REF:11}
29-
- name: "Copy secrets"
30-
run: |
31-
echo "VERSION_NAME=${{ steps.vars.outputs.version }}" >> gradle.properties
3228
- name: "./gradlew assemble"
3329
uses: eskatos/gradle-command-action@v1
3430
env:
3531
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
3632
with:
37-
arguments: assemble
33+
arguments: "assemble -Pversion=${{ steps.vars.outputs.tag }}"
3834
- name: "Create release"
3935
id: create_release
4036
uses: actions/create-release@v1

library/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ android {
1111
minSdkVersion 21
1212
targetSdkVersion 30
1313
versionCode 1
14-
versionName VERSION_NAME ?: '1.0'
14+
versionName project.version
1515

1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
}
@@ -45,7 +45,7 @@ publishing {
4545
mavenJava(MavenPublication) {
4646
groupId = 'com.artemchep.bindin'
4747
artifactId = 'bindin'
48-
version = VERSION_NAME ?: '1.0'
48+
version = project.version
4949

5050
pom {
5151
name = 'bindin'

0 commit comments

Comments
 (0)