fix remote repo pushing
This commit is contained in:
parent
205ec37764
commit
156661bfba
@ -10,15 +10,30 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Push to github remote
|
|
||||||
uses: https://github.com/actions/cpina/github-action-push-to-another-repository@main
|
|
||||||
env:
|
|
||||||
API_TOKEN_GITHUB: ${{ secrets.PUSH_GITHUB_API_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
source-directory: 'frontend'
|
path: 'src'
|
||||||
destination-github-username: 'moll-re'
|
|
||||||
destination-repository-name: 'anyway-frontend-builder'
|
- name: Checkout remote repository
|
||||||
user-email: me@moll.re
|
uses: actions/checkout@v3
|
||||||
target-branch: main
|
with:
|
||||||
|
path: 'dest'
|
||||||
|
ref: 'main'
|
||||||
|
github-server-url: 'https://github.com'
|
||||||
|
repository: 'moll-re/anyway-frontend-builder'
|
||||||
|
token: ${{ secrets.PUSH_GITHUB_API_TOKEN }}
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: true
|
||||||
|
|
||||||
|
- name: Copy files to remote repository
|
||||||
|
run: cp -r src/frontend/. dest/
|
||||||
|
|
||||||
|
- name: Commit and push changes
|
||||||
|
run: |
|
||||||
|
cd dest
|
||||||
|
git config --global user.email "me@moll.re"
|
||||||
|
git config --global user.name "[bot]"
|
||||||
|
git add .
|
||||||
|
git commit -m "Automatic code update for tag"
|
||||||
|
git tag -a ${{ github.ref_name }} -m "mirrored tag"
|
||||||
|
git push origin main --tags
|
||||||
|
@ -5,12 +5,12 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macos-lastest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up ruby env
|
- name: Set up ruby env
|
||||||
uses: ruby/setup-ruby@v1.138.0
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 3.2.1
|
ruby-version: 3.2.1
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
@ -20,9 +20,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
|
|
||||||
- name: Setup android SDK
|
- name: Setup android SDK
|
||||||
uses: https://github.com/android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
|
|
||||||
- name: Infer version number from git tag
|
- name: Infer version number from git tag
|
||||||
id: version
|
id: version
|
||||||
@ -30,10 +30,21 @@ jobs:
|
|||||||
REF_NAME: ${{ github.ref_name }}
|
REF_NAME: ${{ github.ref_name }}
|
||||||
run:
|
run:
|
||||||
# remove the 'v' prefix from the tag name
|
# remove the 'v' prefix from the tag name
|
||||||
echo "VERSION=${REF_NAME//v}" >> $GITHUB_ENV
|
echo "VERSION=${REF_NAME//v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Load secrets from github
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.ANDROID_SECRET_PROPERTIES }}" > secrets.properties
|
||||||
|
echo "${{ secrets.ANDROID_KEYSTORE }}" > release.keystore
|
||||||
|
echo "${{ secrets.ANDROID_GOOGLE_PLAY_JSON }}" > google-key.json
|
||||||
|
working-directory: android
|
||||||
|
|
||||||
|
- name: Install fastlane
|
||||||
|
run: bundle install
|
||||||
|
working-directory: android
|
||||||
|
|
||||||
- name: Run fastlane lane
|
- name: Run fastlane lane
|
||||||
run: bundle exec fastlane deploy
|
run: bundle exec fastlane deploy_release
|
||||||
working-directory: android
|
working-directory: android
|
||||||
env:
|
env:
|
||||||
VERSION_NAME: ${{outputs.version.VERSION}}
|
VERSION_NAME: ${{ steps.version.VERSION }}
|
||||||
|
2
frontend/android/.gitignore
vendored
2
frontend/android/.gitignore
vendored
@ -1,8 +1,6 @@
|
|||||||
gradle-wrapper.jar
|
gradle-wrapper.jar
|
||||||
/.gradle
|
/.gradle
|
||||||
/captures/
|
/captures/
|
||||||
/gradlew
|
|
||||||
/gradlew.bat
|
|
||||||
/local.properties
|
/local.properties
|
||||||
/secrets.properties
|
/secrets.properties
|
||||||
GeneratedPluginRegistrant.java
|
GeneratedPluginRegistrant.java
|
||||||
|
@ -1,28 +1,16 @@
|
|||||||
# This file contains the fastlane.tools configuration
|
|
||||||
# You can find the documentation at https://docs.fastlane.tools
|
|
||||||
#
|
|
||||||
# For a list of all available actions, check out
|
|
||||||
#
|
|
||||||
# https://docs.fastlane.tools/actions
|
|
||||||
#
|
|
||||||
# For a list of all available plugins, check out
|
|
||||||
#
|
|
||||||
# https://docs.fastlane.tools/plugins/available-plugins
|
|
||||||
#
|
|
||||||
|
|
||||||
# Uncomment the line if you want fastlane to automatically update itself
|
# Uncomment the line if you want fastlane to automatically update itself
|
||||||
# update_fastlane
|
# update_fastlane
|
||||||
|
|
||||||
default_platform(:android)
|
default_platform(:android)
|
||||||
|
|
||||||
platform :android do
|
platform :android do
|
||||||
desc "Runs all the tests"
|
# desc "Runs all the tests"
|
||||||
lane :test do
|
# lane :test do
|
||||||
gradle(task: "test")
|
# gradle(task: "test")
|
||||||
end
|
# end
|
||||||
|
|
||||||
desc "Submit a new build to the closed testing lane"
|
desc "Deploy a new version as a preview version"
|
||||||
lane :closed_testing do
|
lane :deploy_testing do
|
||||||
gradle(
|
gradle(
|
||||||
task: "bundle",
|
task: "bundle",
|
||||||
# flavor: "staging",
|
# flavor: "staging",
|
||||||
@ -35,13 +23,13 @@ platform :android do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Deploy a new release to the Google Play"
|
desc "Deploy a new version as a full release"
|
||||||
lane :deploy do
|
lane :deploy_release do
|
||||||
gradle(
|
gradle(
|
||||||
task: "clean assembleRelease",
|
task: "clean assembleRelease",
|
||||||
properties: {
|
properties: {
|
||||||
# loaded from environment
|
# loaded from environment
|
||||||
android.injected.version.name: ENV["VERSION_NAME"],
|
"android.injected.version.name" => ENV["VERSION_NAME"],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
upload_to_play_store(
|
upload_to_play_store(
|
||||||
|
@ -15,29 +15,21 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
|
|||||||
|
|
||||||
## Android
|
## Android
|
||||||
|
|
||||||
### android test
|
### android deploy_testing
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
[bundle exec] fastlane android test
|
[bundle exec] fastlane android deploy_testing
|
||||||
```
|
```
|
||||||
|
|
||||||
Runs all the tests
|
Deploy a new version as a preview version
|
||||||
|
|
||||||
### android closed_testing
|
### android deploy_release
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
[bundle exec] fastlane android closed_testing
|
[bundle exec] fastlane android deploy_release
|
||||||
```
|
```
|
||||||
|
|
||||||
Submit a new build to the closed testing lane
|
Deploy a new version as a full release
|
||||||
|
|
||||||
### android deploy
|
|
||||||
|
|
||||||
```sh
|
|
||||||
[bundle exec] fastlane android deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
Deploy a new version to the Google Play
|
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<testsuites>
|
|
||||||
<testsuite name="fastlane.lanes">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000594355">
|
|
||||||
|
|
||||||
</testcase>
|
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="1: bundle" time="11.355126485">
|
|
||||||
|
|
||||||
</testcase>
|
|
||||||
|
|
||||||
|
|
||||||
<testcase classname="fastlane.lanes" name="2: upload_to_play_store" time="63.414149183">
|
|
||||||
|
|
||||||
</testcase>
|
|
||||||
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
160
frontend/android/gradlew
vendored
Executable file
160
frontend/android/gradlew
vendored
Executable file
@ -0,0 +1,160 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
##
|
||||||
|
## Gradle start up script for UN*X
|
||||||
|
##
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
|
APP_NAME="Gradle"
|
||||||
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD="maximum"
|
||||||
|
|
||||||
|
warn ( ) {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
die ( ) {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN* )
|
||||||
|
cygwin=true
|
||||||
|
;;
|
||||||
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="java"
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||||
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
ulimit -n $MAX_FD
|
||||||
|
if [ $? -ne 0 ] ; then
|
||||||
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=$((i+1))
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
(0) set -- ;;
|
||||||
|
(1) set -- "$args0" ;;
|
||||||
|
(2) set -- "$args0" "$args1" ;;
|
||||||
|
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||||
|
function splitJvmOpts() {
|
||||||
|
JVM_OPTS=("$@")
|
||||||
|
}
|
||||||
|
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||||
|
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||||
|
|
||||||
|
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
Loading…
x
Reference in New Issue
Block a user