From 61876472ade9314bcfe25dcd101e2560bb1b2fa0 Mon Sep 17 00:00:00 2001 From: Dane Madsen Date: Wed, 17 Apr 2024 11:10:50 +1000 Subject: [PATCH] deploy workflow --- .github/workflows/README.md | 31 ------------------------------ .github/workflows/deploy.yml | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/README.md create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index a7005d30..00000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# Build Instructions - -## Android - -### Create keystore: - -Linux / macOS -```bash -keytool -genkey -v -keystore maid-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias maid-key-alias -``` - -For Windows: - -```cmd -"%JAVA_HOME%\bin\keytool.exe" -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-key-alias -``` - -### Storing Secrets in GitHub - -1. **Upload Keystore File**: First, base64 encode your keystore file so you can add it as a GitHub secret. Run the following command in your terminal: - -```bash -base64 -i path/to/keystore/file > keystore_base64.txt -``` - -2. **Add Secrets**: Open your GitHub repository, navigate to `Settings` > `Secrets`, and then add the following secrets: - - `KEYSTORE`: Paste the content of `keystore_base64.txt` here. - - `KEY_ALIAS`: Your key alias. - - `KEY_PASSWORD`: Your key password. - - `STORE_PASSWORD`: Your keystore password. - diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..6da6112b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,37 @@ +name: Deploy + +on: + workflow_run: + workflows: ["Build Android", "Build Linux", "Build Windows", "Release"] + branches: [main] + types: [completed] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Download Android APK Artifacts + uses: actions/download-artifact@v2 + with: + name: maid-android-apk + path: build/app/outputs/apk/release + + - name: Download Android AAB Artifact + uses: actions/download-artifact@v2 + with: + name: maid-android-aab + path: build/app/outputs/bundle/release/app-release.aab + + - name: Download Linux Artifacts + uses: actions/download-artifact@v2 + with: + name: maid-linux + path: build/linux/x64/release/bundle + + - name: Download Windows Artifacts + uses: actions/download-artifact@v2 + with: + name: maid-windows + path: build/windows/x64/bundle + + \ No newline at end of file