From 2f88a5d4e979581f6f3de2300bc2db7d71558a42 Mon Sep 17 00:00:00 2001 From: franceme Date: Fri, 6 Nov 2020 13:49:26 -0500 Subject: [PATCH 1/7] No Update * Added a GitHub Actions Builder --- .github/workflows/publish.yml | 104 ++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..b92bc076 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,104 @@ +name: Create and Release Latex File + +on: + [push, workflow_dispatch] + +jobs: + Setup: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Granting Execution permission + run: chmod +x gradlew + + - name: Setup Android Environment + run: cd /opt && wget --output-document=android-sdk.zip --quiet https://dl.google.com/android/repository/android-22_r02.zip && unzip android-sdk.zip && mv android-5.1.1 android && sudo chown -R 777 android + + - name: Downloading SDK Man + run: curl -s "https://get.sdkman.io" | bash + + - name: Initializing SDKMan + run: source ~/.sdkman/bin/sdkman-init.sh && chmod 777 -R ~/.sdkman + + - name: Installing Java 7 from SDKMan + run: source ~/.sdkman/bin/sdkman-init.sh && yes | sdk install java $(sdk ls java|grep 7.0.*-zulu|head -n 1|cut -d '|' -f6|awk '{$1=$1};1') + + - name: Installing Java 8 from SDKMan + run: source ~/.sdkman/bin/sdkman-init.sh && yes | sdk install java $(sdk ls java|grep 8.0.*-zulu|head -n 1|cut -d '|' -f6|awk '{$1=$1};1') + + - name: Installing Gradle 6 from SDKMan + run: source ~/.sdkman/bin/sdkman-init.sh && yes | sdk install gradle 6.0 + + - name: Setting up Android SDK in SDKMan + run: mkdir -p ~/.sdkman/candidates/android/22_r02 + + - name: Moving the Android SDK into SDKMan + run: mv /opt/android ~/.sdkman/candidates/android/22_r02/platforms + + - name: Linking the latest Android SDK in the SDKMan Structure + run: ln -s ~/.sdkman/candidates/android/22_r02/platforms ~/.sdkman/candidates/android/current + + - name: Read version from Properties-file + id: read_property_original + uses: christian-draeger/read-properties@1.0.1 + with: + path: 'gradle.properties' + property: 'versionNumber' + + - name: Get Time + id: time + uses: nanzm/get-time-action@v1.0 + with: + format: 'YYYY-MM-DD-HH-mm' + + - name: Find and Replace + uses: shitiomatic/str-replace@master + with: + find: "${{steps.read_property_original.outputs.value}}" + replace: "${{steps.read_property_original.outputs.value}}_${{ steps.time.outputs.time }}" + include: gradle.properties + + - name: Read version from Properties-file + id: read_property + uses: christian-draeger/read-properties@1.0.1 + with: + path: 'gradle.properties' + property: 'versionNumber' + + - name: Building the project + run: ./gradlew clean build # -x test + + - name: Move the Jar File + if: github.ref == 'refs/heads/dev' + run: mv build/libs/PrivateGuard-${{ steps.read_property.outputs.value }}.jar PrivateGuard.jar + + - name: Create Release + if: github.ref == 'refs/heads/dev' + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: Release_${{ steps.read_property.outputs.value }}_${{ steps.time.outputs.value }} + release_name: Release_${{ steps.read_property.outputs.value }}}_${{ steps.time.outputs.value }} + body: Release_${{ steps.read_property.outputs.value }}}_${{ steps.time.outputs.value }} + + - name: Upload the Jar to the Release + if: github.ref == 'refs/heads/dev' + id: upload-release-asset-resume + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ github.workspace }}/PrivateGuard.jar + asset_name: PrivateGuard.jar + asset_content_type: application/jar From 86d60238a9fd1dd46b7750b521db5f18aff99a34 Mon Sep 17 00:00:00 2001 From: franceme Date: Mon, 16 Nov 2020 16:55:27 -0500 Subject: [PATCH 2/7] No Version Update Removing Specific Tests for Automation Build --- build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.gradle b/build.gradle index b965809e..fba69e53 100644 --- a/build.gradle +++ b/build.gradle @@ -199,6 +199,9 @@ task writeTestInformation { //Ensuring all of the processors are being used for tests test { + exclude '**/ArgumentsCheckTest.class' + exclude '**/EntryPointTest_SOURCE.class' + environment "ANDROID_HOME", System.getenv("ANDROID_HOME") ?: "ANDROIDSDK" environment "JAVA_HOME", System.getenv("JAVA_HOME") ?: "JAVA8SDK" environment "JAVA7_HOME", System.getenv("JAVA7_HOME") ?: "JAVA7SDK" From 8ac875b87aaf6a90830bbb59791a6004cca20827 Mon Sep 17 00:00:00 2001 From: franceme Date: Mon, 16 Nov 2020 17:36:08 -0500 Subject: [PATCH 3/7] No Update * Fixed the Java Jar Name --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b92bc076..4a654f76 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -78,7 +78,7 @@ jobs: - name: Move the Jar File if: github.ref == 'refs/heads/dev' - run: mv build/libs/PrivateGuard-${{ steps.read_property.outputs.value }}.jar PrivateGuard.jar + run: mv build/libs/CryptoGuard-${{ steps.read_property.outputs.value }}.jar CryptoGuard.jar - name: Create Release if: github.ref == 'refs/heads/dev' From 13b0ade857128a69a2c06ae906693659da7b0a4c Mon Sep 17 00:00:00 2001 From: franceme Date: Mon, 16 Nov 2020 17:53:10 -0500 Subject: [PATCH 4/7] No Update * Changed the tightnaming to a wildcard attempt --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4a654f76..53de7428 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -78,7 +78,7 @@ jobs: - name: Move the Jar File if: github.ref == 'refs/heads/dev' - run: mv build/libs/CryptoGuard-${{ steps.read_property.outputs.value }}.jar CryptoGuard.jar + run: mv build/libs/CryptoGuard-*.jar CryptoGuard.jar - name: Create Release if: github.ref == 'refs/heads/dev' From 636b1530fc29638f122bed31621aa2790b393230 Mon Sep 17 00:00:00 2001 From: franceme Date: Mon, 16 Nov 2020 18:12:37 -0500 Subject: [PATCH 5/7] No Update * Fixed the naming Scheme --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 53de7428..31400b94 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -78,7 +78,7 @@ jobs: - name: Move the Jar File if: github.ref == 'refs/heads/dev' - run: mv build/libs/CryptoGuard-*.jar CryptoGuard.jar + run: mv build/libs/cryptoguard-*.jar cryptoguard.jar - name: Create Release if: github.ref == 'refs/heads/dev' @@ -99,6 +99,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/PrivateGuard.jar + asset_path: ${{ github.workspace }}/cryptoguard.jar asset_name: PrivateGuard.jar asset_content_type: application/jar From 971548cbb199b7a74c297ee6464e31e70125deb0 Mon Sep 17 00:00:00 2001 From: franceme Date: Mon, 16 Nov 2020 18:32:03 -0500 Subject: [PATCH 6/7] No Update * Fixing the release name --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 31400b94..eed3a95e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -88,7 +88,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: Release_${{ steps.read_property.outputs.value }}_${{ steps.time.outputs.value }} - release_name: Release_${{ steps.read_property.outputs.value }}}_${{ steps.time.outputs.value }} + release_name: Release_${{ steps.read_property.outputs.value }}_${{ steps.time.outputs.value }} body: Release_${{ steps.read_property.outputs.value }}}_${{ steps.time.outputs.value }} - name: Upload the Jar to the Release @@ -100,5 +100,5 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ${{ github.workspace }}/cryptoguard.jar - asset_name: PrivateGuard.jar + asset_name: cryptoguard.jar asset_content_type: application/jar From 7f669677315d06f8a4e6b506f72350dfee994312 Mon Sep 17 00:00:00 2001 From: franceme Date: Mon, 16 Nov 2020 21:35:35 -0500 Subject: [PATCH 7/7] No Update * Fixed the name of the Build * Changed the target release to the master Signed-off-by: franceme <9311496+franceme@users.noreply.github.com> --- .github/workflows/publish.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index eed3a95e..862f80d4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Create and Release Latex File +name: Clean, build, test, and release the project. on: [push, workflow_dispatch] @@ -17,7 +17,7 @@ jobs: java-version: 1.8 - name: Granting Execution permission - run: chmod +x gradlew + run: chmod +x gradlew - name: Setup Android Environment run: cd /opt && wget --output-document=android-sdk.zip --quiet https://dl.google.com/android/repository/android-22_r02.zip && unzip android-sdk.zip && mv android-5.1.1 android && sudo chown -R 777 android @@ -64,7 +64,7 @@ jobs: with: find: "${{steps.read_property_original.outputs.value}}" replace: "${{steps.read_property_original.outputs.value}}_${{ steps.time.outputs.time }}" - include: gradle.properties + include: gradle.properties - name: Read version from Properties-file id: read_property @@ -77,11 +77,11 @@ jobs: run: ./gradlew clean build # -x test - name: Move the Jar File - if: github.ref == 'refs/heads/dev' + if: github.ref == 'refs/heads/master' run: mv build/libs/cryptoguard-*.jar cryptoguard.jar - name: Create Release - if: github.ref == 'refs/heads/dev' + if: github.ref == 'refs/heads/master' id: create_release uses: actions/create-release@v1 env: @@ -92,7 +92,7 @@ jobs: body: Release_${{ steps.read_property.outputs.value }}}_${{ steps.time.outputs.value }} - name: Upload the Jar to the Release - if: github.ref == 'refs/heads/dev' + if: github.ref == 'refs/heads/master' id: upload-release-asset-resume uses: actions/upload-release-asset@v1 env: