Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ Release track to target. Default `"internal"`.

Status of the uploaded release. Default `"draft"`.

### `version-name`

Version name to be used`.

## Example usage

```yaml
Expand Down
9 changes: 7 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ inputs:
description: "Status of the release"
default: "draft"
required: false
version-name:
description: "Version name to be used"
required: false
default: ""
runs:
using: "composite"
steps:
Expand All @@ -90,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 }}
Expand All @@ -111,6 +115,7 @@ runs:
FASTLANE_ENV: ${{ inputs.fastlane-env }}
RELEASE_TRACK: ${{ inputs.release-track }}
RELEASE_STATUS: ${{ inputs.release-status }}
VERSION_NAME: ${{ inputs.version-name }}
ACTION_PATH: ${{ github.action_path }}
run: . ${{ github.action_path }}/build.sh
shell: sh
shell: bash
14 changes: 14 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down Expand Up @@ -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"],
Expand Down
1 change: 1 addition & 0 deletions fastlane/Pluginfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

gem 'fastlane-plugin-browserstack'
gem 'fastlane-plugin-increment_version_code'
gem 'fastlane-plugin-increment_version_name'