Skip to content

Commit

Permalink
Create blank.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DeluxerPanda authored Aug 22, 2024
1 parent 72949e3 commit c509d43
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

on:


# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

name: Extract Android Info

jobs:
extract-info:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Extract version from build.gradle
id: extract_version
run: |
# Extract versionCode and versionName from build.gradle
VERSION_CODE=$(grep versionCode app/build.gradle | sed 's/versionCode //')
VERSION_NAME=$(grep versionName app/build.gradle | sed 's/versionName "//;s/"//')
echo "VERSION_CODE=$VERSION_CODE"
echo "VERSION_NAME=$VERSION_NAME"
# Set the extracted values as GitHub Actions outputs
echo "::set-output name=version_code::$VERSION_CODE"
echo "::set-output name=version_name::$VERSION_NAME"
- name: Extract app name from AndroidManifest.xml
id: extract_app_name
run: |
# Extract the app name from AndroidManifest.xml
APP_NAME=$(grep 'android:label' app/src/main/AndroidManifest.xml | sed 's/android:label="@string\///;s/"//')
echo "APP_NAME=$APP_NAME"
# Set the extracted app name as a GitHub Actions output
echo "::set-output name=app_name::$APP_NAME"
- name: Use extracted information
run: |
echo "Version Code: ${{ steps.extract_version.outputs.version_code }}"
echo "Version Name: ${{ steps.extract_version.outputs.version_name }}"
echo "App Name: ${{ steps.extract_app_name.outputs.app_name }}"

0 comments on commit c509d43

Please sign in to comment.