From 1b60b64fa69e8024317136678ca6e70e8a14d4c9 Mon Sep 17 00:00:00 2001 From: Luke Rogers <8382642+luke-rogers@users.noreply.github.com> Date: Thu, 6 Apr 2023 10:17:58 +0100 Subject: [PATCH 1/4] feat: new input for `VERSION_NAME` --- README.md | 4 ++++ action.yml | 5 +++++ fastlane/Fastfile | 14 ++++++++++++++ fastlane/Pluginfile | 1 + 4 files changed, 24 insertions(+) diff --git a/README.md b/README.md index 48c9ffd..55d8bc8 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,10 @@ Bundler version to be used. Specify the env that fastlane should load. +### `version-name` + +Version name to be used`. + ## Example usage ```yaml diff --git a/action.yml b/action.yml index 0ab3ba4..65730e8 100644 --- a/action.yml +++ b/action.yml @@ -67,6 +67,10 @@ inputs: description: "Specify the bundler version you wish to use" default: "2.3" required: false + version-name: + description: "Version name to be used" + required: false + default: "" runs: using: "composite" steps: @@ -96,6 +100,7 @@ runs: BROWSERSTACK_USERNAME: ${{ inputs.browserstack-username }} BROWSERSTACK_ACCESS_KEY: ${{ inputs.browserstack-access-key }} FASTLANE_ENV: ${{ inputs.fastlane-env }} + VERSION_NAME: ${{ inputs.version-name }} ACTION_PATH: ${{ github.action_path }} run: . ${{ github.action_path }}/build.sh shell: sh diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 74ef71d..8ab565a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -7,6 +7,13 @@ platform :android do increment_version_code() end + if !ENV["VERSION_NAME"].empty? + increment_version_name( + gradle_file_path: ENV["PROJECT_PATH"] + "/app/build.gradle", + version_name: ENV["VERSION_NAME"] + ) + end + gradle( task: ENV["GRADLE_TASK"], project_dir: ENV["PROJECT_PATH"], @@ -55,6 +62,13 @@ platform :android do sh("ls", "-la", "..") sh("ls", "-la") + if !ENV["VERSION_NAME"].empty? + increment_version_name( + gradle_file_path: ENV["PROJECT_PATH"] + "/app/build.gradle", + version_name: ENV["VERSION_NAME"] + ) + end + gradle( task: ENV["GRADLE_TASK"], project_dir: ENV["PROJECT_PATH"], diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile index 3582b04..23465df 100644 --- a/fastlane/Pluginfile +++ b/fastlane/Pluginfile @@ -4,3 +4,4 @@ gem 'fastlane-plugin-browserstack' gem 'fastlane-plugin-increment_version_code' +gem 'fastlane-plugin-increment_version_name' From e48b57d1bde0cb7365e950c550607f248234d056 Mon Sep 17 00:00:00 2001 From: Luke Rogers <8382642+luke-rogers@users.noreply.github.com> Date: Tue, 25 Apr 2023 10:26:17 +0100 Subject: [PATCH 2/4] fix: incorrect indentation --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index cda6834..bc67d9a 100644 --- a/action.yml +++ b/action.yml @@ -110,7 +110,7 @@ runs: FASTLANE_ENV: ${{ inputs.fastlane-env }} RELEASE_TRACK: ${{ inputs.release-track }} RELEASE_STATUS: ${{ inputs.release-status }} - VERSION_NAME: ${{ inputs.version-name }} + VERSION_NAME: ${{ inputs.version-name }} ACTION_PATH: ${{ github.action_path }} run: . ${{ github.action_path }}/build.sh shell: sh From 03648453bf50d054f1d8837d4117ea7d22cf4203 Mon Sep 17 00:00:00 2001 From: Luke Rogers <8382642+luke-rogers@users.noreply.github.com> Date: Tue, 13 Feb 2024 17:25:27 +0000 Subject: [PATCH 3/4] update shell to bash --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 797803e..5d081a8 100644 --- a/action.yml +++ b/action.yml @@ -118,4 +118,4 @@ runs: VERSION_NAME: ${{ inputs.version-name }} ACTION_PATH: ${{ github.action_path }} run: . ${{ github.action_path }}/build.sh - shell: sh + shell: bash From cda14b735fa984322bb417416ab6c6695c24c358 Mon Sep 17 00:00:00 2001 From: Luke Rogers <8382642+luke-rogers@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:51:13 +0100 Subject: [PATCH 4/4] chore: bump node version to 18 --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 5d081a8..fdd770a 100644 --- a/action.yml +++ b/action.yml @@ -94,7 +94,7 @@ runs: - id: "SETUP_NODE" uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - id: "RUN_INDEX" env: BUILD_TYPE: ${{ inputs.build-type }}