From f880c259c2fa8da408e9f606bc323ee18f7598b7 Mon Sep 17 00:00:00 2001 From: Claudine Date: Thu, 20 Mar 2025 15:31:57 +0000 Subject: [PATCH 1/5] use release tag name for prettyVersion --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a93c24..ca64fc8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: gradle-version: 8.5 - name: Build with Gradle id: build - run: gradle buildReleaseArtifacts + run: gradle -Pversion=${{ github.event.release.tag_name }} buildReleaseArtifacts - name: Release uses: softprops/action-gh-release@v2 with: From 2684c0d374ddc9730cbdc7daa47d89c5b51cf132 Mon Sep 17 00:00:00 2001 From: Claudine Date: Thu, 20 Mar 2025 16:58:21 +0000 Subject: [PATCH 2/5] update documentation about release tag --- docs/release.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/release.md b/docs/release.md index b6ce6f6..df5c88a 100644 --- a/docs/release.md +++ b/docs/release.md @@ -40,7 +40,10 @@ Releasing your library on GitHub allows users to access known-working versions o 5. Add a title and description for the release, highlighting key updates or changes. 6. Click on **Publish release**. -This will trigger the GitHub workflow (`.github/workflows/release.yml`), which automatically create release artifacts—`*.txt`, `*.zip`, `*.pdex` files—and add them to the release. +This will trigger the GitHub workflow (`.github/workflows/release.yml`), which automatically create release artifacts—`*.txt`, `*.zip`, `*.pdex` files—and add them to the release. + +!!! Important + The release tag created on Github will be propagated to the release artifacts, specifically the `prettyVersion` in the txt file and `library.properties` file in the zip. This overwrites the value input for `version` in the `build.gradle.kts` file. !!! Note By default, GitHub will also include compressed versions of your source code (e.g., `Source code (zip)` and `Source code (tar.gz)`). From 6acce387d6d83b69b93b83d08742569cb263fac7 Mon Sep 17 00:00:00 2001 From: Claudine Date: Thu, 20 Mar 2025 17:03:02 +0000 Subject: [PATCH 3/5] REMOVE: add test tags to triggers --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca64fc8..c9125fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: tags: - 'v*' + - 'test*' jobs: release: From a7651e89c8d71d01da84ce3b6676bd68825ab086 Mon Sep 17 00:00:00 2001 From: Claudine Date: Thu, 20 Mar 2025 17:07:23 +0000 Subject: [PATCH 4/5] add branch --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9125fb..96ca76b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,8 @@ name: Release on: push: + branches: + - release-version-in-txt tags: - 'v*' - 'test*' From be23b17d9b3509b09d54674277c29d9c4128925a Mon Sep 17 00:00:00 2001 From: Claudine Date: Thu, 20 Mar 2025 17:17:40 +0000 Subject: [PATCH 5/5] add name of tag to workflow manually --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96ca76b..820af25 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,6 @@ on: - release-version-in-txt tags: - 'v*' - - 'test*' jobs: release: @@ -28,7 +27,7 @@ jobs: gradle-version: 8.5 - name: Build with Gradle id: build - run: gradle -Pversion=${{ github.event.release.tag_name }} buildReleaseArtifacts + run: gradle -Pversion=v-tag-manual buildReleaseArtifacts - name: Release uses: softprops/action-gh-release@v2 with: