From 26b791b799ed6988f2b402ab1c81a7af0f5975e2 Mon Sep 17 00:00:00 2001 From: Natan Date: Wed, 10 Jan 2024 08:37:52 -0300 Subject: [PATCH] get version from properties --- .github/workflows/tag.yml | 10 +++++++++- gradle.properties | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 068d6d53..bfcbb7a5 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -7,13 +7,21 @@ jobs: add-tag: runs-on: ubuntu-latest steps: + - uses: madhead/read-java-properties@latest + id: version + with: + file: gradle.properties + property: version + default: 0.0.1 + - name: Create Git tag uses: actions/github-script@v7 with: script: | + const versionOutputs = ${{ toJSON(steps.version.outputs) }}; github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, - ref: "refs/tags/1.0.0-b9-test", + ref: "refs/tags/${versionOutputs.value}", sha: context.sha }) \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 4d850092..0cb8670e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -libVersion=1.0.0-b9 \ No newline at end of file +version=1.0.0-b9 \ No newline at end of file