Skip to content

Commit

Permalink
Add actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kairusds committed Nov 6, 2022
1 parent 3ee02a0 commit 6abcbb7
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Android CI

on:
push:
branches: [master]

jobs:
build:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: set up JDK 11
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 11

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Create debug build
uses: gradle/gradle-build-action@v2
with:
arguments: assembleDebug
61 changes: 61 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Create Release

on: workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 11

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Gradle build
uses: gradle/gradle-build-action@v2
with:
arguments: build

- name: Sign apk
uses: ilharp/sign-android-release@v1
id: sign_app
with:
signingKey: "MIIKZgIBAzCCChAGCSqGSIb3DQEHAaCCCgEEggn9MIIJ+TCCBcAGCSqGSIb3DQEHAaCCBbEEggWtMIIFqTCCBaUGCyqGSIb3DQEMCgECoIIFQDCCBTwwZgYJKoZIhvcNAQUNMFkwOAYJKoZIhvcNAQUMMCsEFBK8sewAuCGaJSUQevN6BGz8H4IpAgInEAIBIDAMBggqhkiG9w0CCQUAMB0GCWCGSAFlAwQBKgQQfu3olnDhGOs97FiRuhOpUQSCBNBqViapCbT3gfYfJ7i1wxYJM3KKM3BdWHYHfc6ENhGGwxFXPuZoM0xQMlUT09Zgj5ssb+RQgJfO8+JlgtDbLEOs35NnDOc4g7n2mO+ePJlK6hiCVbZjal/o5HoJbmI3W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WvWJUgeaXBfJJH3IDvDFlzVAWZIc+fXQT2V7jdi46WZdts1wZf+I0TYIs1BFh/g3DCZ3M//r9d3Cv3Y7L5I3akY4L5zWncptpkUy0SqV8/VSZtr83AjKr0PMJ81XbF868SdtVGy2cEtf++k8+mkO+6/s0PP7O7uJGJVHouFlzwKHeQ+cVYdkRJ7pfgNchhawunEdgBoEkGgS/t0Pi7DpxmKB4/YQmkTMhabgiWLl8zI1BopS9DznAry5YYCh1ROB94LghzzA4ODVzk28m0Piff7H8ouXcf38hmV9FBD4hVdF3ihCa7P0PYegH6DpSwQEtjO7d5uRZflMgdc0JaDZWptsV99S51HudWWr/q9YkKhepyldB0AERX1+SQ5a25KsRYoMhFyr3o2gOF8uLlUTzCuGjwRICVlNtLCr/pTgm2V20gkjWji5m7fhhuJ1VtCULe2yRNt+W4cLzWT5u3otvqFm4uwS7iwXYzpQaa5ljcCF4DBAr51Zv4HsfjxijPoGUe72V6zXHDkNjYO/IqzDasp7m8vfuvJIAkiSRmiexID1GmjOerU0wFGFGYlm0F2dyic5T/HHU/bU2jhB/Wd/5+cIZLLYbfoSye2CC3bHzRxwkKvVztDfqAvJn/CpREV2ffYZXO8zdId9Q9NUawX8YrMWMSZdaBAJwMrNQecXRrASjNGfV2g7ieLm/55pwESW5Vm82ovZe0B/xaI2uLTiO880DEHDNFH2nXyCFFgUWLQwbfusCwBv/wBZ6OZdlrB7TlhQshEpr4bJtRATfCYTLRq+vNaV58MlNzMKTmU6Q6FQFo8XVJnTXYpeU/U1yZzDpeeAmtnP8HHfaaUt+m78ZDQZIO2iGd1xa43yPBKg23A4iocG/L8v5yRiRRVsKJ55/EMzBTBNMDEwDQYJYIZIAWUDBAIBBQAEIGJDzkP0CsMR5xMBeEn7U+2IB5oo5tduKLky5wTHbdUxBBS6zRWHrlkSptaZ884YeTwm56vNNwICJxA="
keyAlias: "androiddebugkey"
keyStorePassword: "android"
keyPassword: "android"
buildToolsVersion: 33.0.0

- name: Get apk checksums
run: |
echo "APK_PATH=${{ steps.sign_app.outputs.signedFile }}" >> $GITHUB_ENV
echo "APK_MD5=$(md5sum ${{ env.APK_PATH }} | awk '{ print $1 }')" >> $GITHUB_ENV
echo "APK_SHA1=$(sha1sum ${{ env.APK_PATH }} | awk '{ print $1 }')" >> $GITHUB_ENV
echo "APK_SHA256=$(sha256sum ${{ env.APK_PATH }} | awk '{ print $1 }')" >> $GITHUB_ENV
- name: Get apk version
id: apk-version
uses: kairusds/[email protected]
with:
path: ${{ env.APK_PATH }}

- name: Upload binaries to a release
uses: softprops/action-gh-release@v1
with:
body: |
## File Checksums
MD5: `${{ env.APK_MD5 }}`
SHA1: `${{ env.APK_SHA1 }}`
SHA256: `${{ env.APK_SHA256 }}`
files: ${{ env.APK_PATH }}
tag_name: ${{ steps.apk-version.outputs.name }}

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: Orientation_Control
path: ${{ env.APK_PATH }}

0 comments on commit 6abcbb7

Please sign in to comment.