-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for version bump github action using fastlane
- Loading branch information
Showing
5 changed files
with
181 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Bump Version and Create PR | ||
|
||
on: | ||
push: | ||
branches: [ fastlane-updated-task ] | ||
pull_request: | ||
branches: [ fastlane-updated-task ] | ||
workflow_dispatch: | ||
inputs: | ||
bump_type: | ||
description: 'Version Bump Type (patch/minor/major)' | ||
required: true | ||
default: 'patch' | ||
|
||
jobs: | ||
version-bump: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: fastlane-updated-task | ||
fetch-depth: 0 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.2.2' | ||
|
||
- name: Install Fastlane | ||
run: gem install fastlane | ||
|
||
- name: Create new branch for version bump | ||
run: | | ||
git config --global user.name 'github-actions' | ||
git config --global user.email '[email protected]' | ||
new_branch="version-bump-${{ github.run_id }}" | ||
git checkout -b $new_branch | ||
- name: Run Fastlane lane for version bump | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ACTION_GITHUB_TOKEN }} | ||
run: fastlane android version_bump type:${{ github.event.inputs.bump_type }} | ||
|
||
- name: Get the latest commit message | ||
id: latest-commit | ||
run: | | ||
commit_message=$(git log -1 --pretty=%B) | ||
echo "commit_message=$commit_message" >> $GITHUB_ENV | ||
- name: Create Pull Request | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
github_token: ${{ secrets.ACTION_GITHUB_TOKEN }} | ||
source_branch: "version-bump-${{ github.run_id }}" | ||
destination_branch: "main" | ||
pr_title: "${{ env.commit_message }}" | ||
pr_body: "This PR is auto-generated by GitHub Actions to bump the version." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
fastlane documentation | ||
---- | ||
|
||
# Installation | ||
|
||
Make sure you have the latest version of the Xcode command line tools installed: | ||
|
||
```sh | ||
xcode-select --install | ||
``` | ||
|
||
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) | ||
|
||
# Available Actions | ||
|
||
## Android | ||
|
||
### android beta | ||
|
||
```sh | ||
[bundle exec] fastlane android beta | ||
``` | ||
|
||
Deploy a internal testing version to the Google Play | ||
|
||
### android version_bump | ||
|
||
```sh | ||
[bundle exec] fastlane android version_bump | ||
``` | ||
|
||
Version bump | ||
|
||
### android production | ||
|
||
```sh | ||
[bundle exec] fastlane android production | ||
``` | ||
|
||
Deploy a new version to the Google Play | ||
|
||
---- | ||
|
||
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. | ||
|
||
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). | ||
|
||
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<testsuites> | ||
<testsuite name="fastlane.lanes"> | ||
|
||
|
||
|
||
|
||
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.0002"> | ||
|
||
</testcase> | ||
|
||
|
||
<testcase classname="fastlane.lanes" name="1: git_commit" time="6.529921"> | ||
|
||
</testcase> | ||
|
||
</testsuite> | ||
</testsuites> |