Skip to content

Commit

Permalink
Use project.version to pass versions
Browse files Browse the repository at this point in the history
  • Loading branch information
AChep committed Feb 27, 2021
1 parent 1747256 commit 59bf42c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Create release
on:
push:
tags:
- 'v*'
- '*'

jobs:
publish:
Expand All @@ -25,16 +25,12 @@ jobs:
- id: vars
run: |
echo ::set-output name=tag::${GITHUB_REF:10}
echo ::set-output name=version::${GITHUB_REF:11}
- name: "Copy secrets"
run: |
echo "VERSION_NAME=${{ steps.vars.outputs.version }}" >> gradle.properties
- name: "./gradlew assemble"
uses: eskatos/gradle-command-action@v1
env:
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
with:
arguments: assemble
arguments: "assemble -Pversion=${{ steps.vars.outputs.tag }}"
- name: "Create release"
id: create_release
uses: actions/create-release@v1
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName VERSION_NAME ?: '1.0'
versionName project.version

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -45,7 +45,7 @@ publishing {
mavenJava(MavenPublication) {
groupId = 'com.artemchep.bindin'
artifactId = 'bindin'
version = VERSION_NAME ?: '1.0'
version = project.version

pom {
name = 'bindin'
Expand Down

0 comments on commit 59bf42c

Please sign in to comment.