-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update pom and github action to allow for android anapshots
- Loading branch information
1 parent
2436d6e
commit 9355e3f
Showing
3 changed files
with
50 additions
and
16 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Forge Snapshot | ||
name: Create Android Snapshot | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -8,6 +8,10 @@ on: | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
required: false | ||
default: false | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
- cron: '00 19 * * *' | ||
|
||
|
||
jobs: | ||
build: | ||
|
@@ -30,6 +34,14 @@ jobs: | |
server-username: ${{ secrets.FTP_USERNAME }} | ||
server-password: ${{ secrets.FTP_PASSWORD }} | ||
settings-path: ${{ github.workspace }} # location for the settings.xml file | ||
|
||
- name: Install old maven (3.6.3) | ||
run: | | ||
curl -o apache-maven-3.6.3-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | ||
tar xf apache-maven-3.6.3-bin.tar.gz | ||
export PATH=$PWD/apache-maven-3.6.3/bin:$PATH | ||
export MAVEN_HOME=$PWD/apache-maven-3.6.3 | ||
mvn --version | ||
- name: Install android SDK | ||
uses: maxim-lobanov/setup-android-tools@v1 | ||
|
@@ -46,32 +58,52 @@ jobs: | |
- name: Extract Android keystore | ||
run: | | ||
ls | ||
cd forge-gui-android | ||
echo "${{ secrets.FORGE_KEYSTORE }}" > forge.keystore.asc | ||
gpg -d -passphrase "${{ secrets.FORGE_KEYSTORE_PASSPHRASE }}" --batch forge.keystore.asc > forge.keystore | ||
gpg -d --passphrase "${{ secrets.FORGE_KEYSTORE_PASSPHRASE }}" --batch forge.keystore.asc > forge.keystore | ||
cd - | ||
- name: Setup tmate session | ||
uses: mxschmitt/action-tmate@v3 | ||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | ||
|
||
- name: Configure Git User | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Actions" | ||
- name: maven clean install | ||
run: | | ||
mvn clean install -Dmaven.test.skip=true | ||
- name: Setup tmate session | ||
uses: mxschmitt/action-tmate@v3 | ||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | ||
|
||
- name: Install Android maven plugin | ||
run: | | ||
mkdir -p ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.1 | ||
cd ~/.m2/repository/com/simpligility/maven/plugins/android-maven-plugin/4.6.1 | ||
curl -L -o android-maven-plugin-4.6.1.jar https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.1/android-maven-plugin-4.6.1.jar | ||
curl -L -o android-maven-plugin-4.6.1.pom https://github.com/Card-Forge/android-maven-plugin/releases/download/4.6.1/android-maven-plugin-4.6.1.pom | ||
#mvn install:install-file -Dfile=android-maven-plugin-4.6.1.jar -DgroupId=com.simpligility.maven.plugins -DartifactId=android-maven-plugin -Dversion=4.6.1 -Dpackaging=jar | ||
cd - | ||
mvn install -Dmaven.test.skip=true | ||
mvn dependency:tree | ||
- name: Build/Install/Publish to GitHub Packages Apache Maven | ||
run: | | ||
mvn -U -B -P android-release-build,android-release-sign install -e -Dsign.keystore=forge.keystore -Dsign.alias=Forge -Dsign.storepass=${{ secrets.SIGN_STORE_PASS }} -Dsign.keypass=${{ secrets.SIGN_KEY_PASS }} -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }} -Dandroid.sdk.path=/usr/local/lib/android/sdk | ||
export _JAVA_OPTIONS="-Xmx2g" | ||
mvn -U -B -P android-release-build,android-release-sign install -e -Dsign.keystore=forge.keystore -Dsign.alias=Forge -Dsign.storepass=${{ secrets.SIGN_STORE_PASS }} -Dsign.keypass=${{ secrets.SIGN_STORE_PASS }} -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }} -Dandroid.sdk.path=/usr/local/lib/android/sdk -Dandroid.buildToolsVersion=30.0.3 -Dmaven.test.skip=true | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Move important file | ||
run: | | ||
mkdir -p forge-gui-android/target/upload | ||
mv forge-gui-android/target/*-signed-aligned.apk forge-gui-android/target/upload/ | ||
mv forge-gui-android/target/assets.zip forge-gui-android/target/upload/ | ||
ls forge-gui-android/target/upload/ | ||
- name: 📂 Sync files | ||
uses: SamKirkland/[email protected] | ||
with: | ||
server: ftp.cardforge.org | ||
username: ${{ secrets.FTP_USERNAME }} | ||
password: ${{ secrets.FTP_PASSWORD }} | ||
local-dir: forge-gui-android/target/upload/ | ||
server-dir: downloads/dailysnapshots/ | ||
state-name: .ftp-deploy-android-sync-state.json |
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