Skip to content

Commit 66870a9

Browse files
authored
Release Parent 4.11.0 (68)
2 parents f983567 + 1f2fd85 commit 66870a9

853 files changed

Lines changed: 31801 additions & 6019 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-app.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ on:
1616
required: true
1717
type: string
1818
secrets:
19-
ACCESS_TOKEN:
19+
GH_APP_ID:
20+
required: true
21+
GH_APP_PRIVATE_KEY:
2022
required: true
2123
ANDROID_RELEASE_KEYSTORE_B64:
2224
required: true
@@ -30,12 +32,21 @@ jobs:
3032
name: ${{ inputs.app-type-lower }}-build
3133
runs-on: ubuntu-latest
3234
steps:
35+
- name: Generate GitHub App token
36+
id: app-token
37+
uses: actions/create-github-app-token@v1
38+
with:
39+
app-id: ${{ secrets.GH_APP_ID }}
40+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
41+
owner: ${{ github.repository_owner }}
42+
repositories: canvas-android,android-vault
43+
3344
- name: Checkout repository
3445
uses: actions/checkout@v4
3546
with:
3647
submodules: 'recursive'
3748
fetch-depth: 1
38-
token: ${{ secrets.ACCESS_TOKEN }}
49+
token: ${{ steps.app-token.outputs.token }}
3950

4051
- name: Set up JDK 17
4152
uses: actions/setup-java@v4

.github/workflows/create-tag.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Create Tag
2+
3+
on:
4+
push:
5+
branches:
6+
- 'release/student'
7+
- 'release/teacher'
8+
- 'release/parent'
9+
10+
jobs:
11+
create-tag:
12+
name: create-tag
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 10
15+
permissions:
16+
contents: write
17+
env:
18+
JIRA_USERNAME: ${{ secrets.JIRA_USERNAME }}
19+
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
20+
steps:
21+
- name: Generate GitHub App token
22+
id: app-token
23+
uses: actions/create-github-app-token@v1
24+
with:
25+
app-id: ${{ secrets.GH_APP_ID }}
26+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
27+
owner: ${{ github.repository_owner }}
28+
repositories: canvas-android,android-vault
29+
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
token: ${{ steps.app-token.outputs.token }}
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: '18'
40+
41+
- name: Determine app from branch
42+
id: app-info
43+
run: |
44+
APP_NAME=$(echo "${GITHUB_REF_NAME}" | sed 's|release/||')
45+
echo "app-name=${APP_NAME}" >> "$GITHUB_OUTPUT"
46+
47+
VERSION_CODE=$(grep 'versionCode' apps/${APP_NAME}/build.gradle | head -1 | awk '{print $NF}')
48+
VERSION_NAME=$(grep 'versionName' apps/${APP_NAME}/build.gradle | head -1 | awk '{print $NF}')
49+
VERSION_NAME=${VERSION_NAME//\"/}
50+
VERSION_NAME=${VERSION_NAME//\'/}
51+
52+
TAG="${APP_NAME}-${VERSION_NAME}-${VERSION_CODE}"
53+
echo "version-code=${VERSION_CODE}" >> "$GITHUB_OUTPUT"
54+
echo "version-name=${VERSION_NAME}" >> "$GITHUB_OUTPUT"
55+
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
56+
57+
echo "App: ${APP_NAME}"
58+
echo "Version: ${VERSION_NAME} (${VERSION_CODE})"
59+
echo "Tag: ${TAG}"
60+
61+
- name: Configure git
62+
run: |
63+
git config user.name "github-actions[bot]"
64+
git config user.email "github-actions[bot]@users.noreply.github.com"
65+
66+
- name: Create and push tag
67+
id: create-tag
68+
run: |
69+
TAG="${{ steps.app-info.outputs.tag }}"
70+
if git rev-parse "$TAG" >/dev/null 2>&1; then
71+
echo "Tag $TAG already exists, skipping tag creation"
72+
echo "tag-exists=true" >> "$GITHUB_OUTPUT"
73+
else
74+
git tag "$TAG"
75+
git push origin "$TAG"
76+
echo "tag-exists=false" >> "$GITHUB_OUTPUT"
77+
fi
78+
79+
- name: Create GitHub Release
80+
if: steps.create-tag.outputs.tag-exists != 'true'
81+
env:
82+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
83+
run: |
84+
APP_NAME="${{ steps.app-info.outputs.app-name }}"
85+
VERSION_NAME="${{ steps.app-info.outputs.version-name }}"
86+
VERSION_CODE="${{ steps.app-info.outputs.version-code }}"
87+
TAG="${{ steps.app-info.outputs.tag }}"
88+
89+
gh release create "$TAG" \
90+
--title "${APP_NAME} ${VERSION_NAME} (${VERSION_CODE})" \
91+
--notes "${APP_NAME} ${VERSION_NAME} (${VERSION_CODE})" \
92+
--draft
93+
94+
- name: Update JIRA fix versions
95+
if: steps.create-tag.outputs.tag-exists != 'true' && env.JIRA_USERNAME != ''
96+
run: |
97+
cd scripts
98+
npm install jira-client@4.0.1
99+
node update-jira-issues.js "${{ steps.app-info.outputs.tag }}"
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Deploy Parent
2+
3+
on:
4+
push:
5+
tags:
6+
- 'parent-*'
7+
8+
concurrency:
9+
group: deploy-parent
10+
cancel-in-progress: false
11+
12+
jobs:
13+
build-and-deploy:
14+
name: build-and-deploy
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 60
17+
steps:
18+
- name: Generate GitHub App token
19+
id: app-token
20+
uses: actions/create-github-app-token@v1
21+
with:
22+
app-id: ${{ secrets.GH_APP_ID }}
23+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
24+
owner: ${{ github.repository_owner }}
25+
repositories: canvas-android,android-vault
26+
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
submodules: 'recursive'
31+
token: ${{ steps.app-token.outputs.token }}
32+
33+
- name: Setup Gradle
34+
uses: gradle/actions/setup-gradle@v4
35+
with:
36+
gradle-version: wrapper
37+
java-version: '17'
38+
39+
- name: Decode release keystore
40+
env:
41+
KEYSTORE_B64: ${{ secrets.ANDROID_RELEASE_KEYSTORE_B64 }}
42+
run: |
43+
echo "$KEYSTORE_B64" | base64 --decode > release.jks
44+
chmod 600 release.jks
45+
46+
- name: Build production release
47+
run: |
48+
./gradle/gradlew -p apps \
49+
:parent:assembleProdRelease \
50+
:parent:bundleProdRelease \
51+
--stacktrace \
52+
--build-cache \
53+
--parallel \
54+
--max-workers=4 \
55+
--no-daemon \
56+
-Dorg.gradle.jvmargs="-Xmx6g -XX:+HeapDumpOnOutOfMemoryError" \
57+
-Dkotlin.compiler.execution.strategy=in-process \
58+
-Pandroid.injected.signing.store.file=$(pwd)/release.jks \
59+
-Pandroid.injected.signing.store.password="${KEYSTORE_PASSWORD}" \
60+
-Pandroid.injected.signing.key.alias="${KEYSTORE_KEY_ALIAS}" \
61+
-Pandroid.injected.signing.key.password="${KEYSTORE_KEY_PASSWORD}"
62+
env:
63+
GRADLE_OPTS: "-Djava.net.preferIPv4Stack=true"
64+
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
65+
KEYSTORE_KEY_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
66+
KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD }}
67+
68+
- name: Upload to Google Play
69+
uses: r0adkll/upload-google-play@v1
70+
with:
71+
serviceAccountJsonPlainText: ${{ secrets.GPLAY_SERVICE_ACCOUNT_KEY }}
72+
packageName: com.instructure.parentapp
73+
releaseFiles: apps/parent/build/outputs/bundle/prodRelease/parent-prod-release.aab
74+
track: internal
75+
status: completed
76+
77+
- name: Cleanup sensitive files
78+
if: always()
79+
run: rm -f release.jks
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Deploy Student
2+
3+
on:
4+
push:
5+
tags:
6+
- 'student-*'
7+
8+
concurrency:
9+
group: deploy-student
10+
cancel-in-progress: false
11+
12+
jobs:
13+
build-and-deploy:
14+
name: build-and-deploy
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 60
17+
steps:
18+
- name: Generate GitHub App token
19+
id: app-token
20+
uses: actions/create-github-app-token@v1
21+
with:
22+
app-id: ${{ secrets.GH_APP_ID }}
23+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
24+
owner: ${{ github.repository_owner }}
25+
repositories: canvas-android,android-vault
26+
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
submodules: 'recursive'
31+
token: ${{ steps.app-token.outputs.token }}
32+
33+
- name: Setup Gradle
34+
uses: gradle/actions/setup-gradle@v4
35+
with:
36+
gradle-version: wrapper
37+
java-version: '17'
38+
39+
- name: Decode release keystore
40+
env:
41+
KEYSTORE_B64: ${{ secrets.ANDROID_RELEASE_KEYSTORE_B64 }}
42+
run: |
43+
echo "$KEYSTORE_B64" | base64 --decode > release.jks
44+
chmod 600 release.jks
45+
46+
- name: Build production release
47+
run: |
48+
./gradle/gradlew -p apps \
49+
:student:assembleProdRelease \
50+
:student:bundleProdRelease \
51+
--stacktrace \
52+
--build-cache \
53+
--parallel \
54+
--max-workers=4 \
55+
--no-daemon \
56+
-Dorg.gradle.jvmargs="-Xmx6g -XX:+HeapDumpOnOutOfMemoryError" \
57+
-Dkotlin.compiler.execution.strategy=in-process \
58+
-Pandroid.injected.signing.store.file=$(pwd)/release.jks \
59+
-Pandroid.injected.signing.store.password="${KEYSTORE_PASSWORD}" \
60+
-Pandroid.injected.signing.key.alias="${KEYSTORE_KEY_ALIAS}" \
61+
-Pandroid.injected.signing.key.password="${KEYSTORE_KEY_PASSWORD}"
62+
env:
63+
GRADLE_OPTS: "-Djava.net.preferIPv4Stack=true"
64+
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
65+
KEYSTORE_KEY_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
66+
KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD }}
67+
68+
- name: Extract update priority
69+
id: priority
70+
run: |
71+
UPDATE_PRIORITY=$(grep 'updatePriority' apps/student/build.gradle | head -1 | awk '{print $NF}')
72+
echo "value=${UPDATE_PRIORITY}" >> "$GITHUB_OUTPUT"
73+
74+
- name: Upload to Google Play
75+
uses: r0adkll/upload-google-play@v1
76+
with:
77+
serviceAccountJsonPlainText: ${{ secrets.GPLAY_SERVICE_ACCOUNT_KEY }}
78+
packageName: com.instructure.candroid
79+
releaseFiles: apps/student/build/outputs/bundle/prodRelease/student-prod-release.aab
80+
track: internal
81+
inAppUpdatePriority: ${{ steps.priority.outputs.value }}
82+
status: completed
83+
84+
- name: Cleanup sensitive files
85+
if: always()
86+
run: rm -f release.jks
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Deploy Teacher
2+
3+
on:
4+
push:
5+
tags:
6+
- 'teacher-*'
7+
8+
concurrency:
9+
group: deploy-teacher
10+
cancel-in-progress: false
11+
12+
jobs:
13+
build-and-deploy:
14+
name: build-and-deploy
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 60
17+
steps:
18+
- name: Generate GitHub App token
19+
id: app-token
20+
uses: actions/create-github-app-token@v1
21+
with:
22+
app-id: ${{ secrets.GH_APP_ID }}
23+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
24+
owner: ${{ github.repository_owner }}
25+
repositories: canvas-android,android-vault
26+
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
submodules: 'recursive'
31+
token: ${{ steps.app-token.outputs.token }}
32+
33+
- name: Setup Gradle
34+
uses: gradle/actions/setup-gradle@v4
35+
with:
36+
gradle-version: wrapper
37+
java-version: '17'
38+
39+
- name: Decode release keystore
40+
env:
41+
KEYSTORE_B64: ${{ secrets.ANDROID_RELEASE_KEYSTORE_B64 }}
42+
run: |
43+
echo "$KEYSTORE_B64" | base64 --decode > release.jks
44+
chmod 600 release.jks
45+
46+
- name: Build production release
47+
run: |
48+
./gradle/gradlew -p apps \
49+
:teacher:assembleProdRelease \
50+
:teacher:bundleProdRelease \
51+
--stacktrace \
52+
--build-cache \
53+
--parallel \
54+
--max-workers=4 \
55+
--no-daemon \
56+
-Dorg.gradle.jvmargs="-Xmx6g -XX:+HeapDumpOnOutOfMemoryError" \
57+
-Dkotlin.compiler.execution.strategy=in-process \
58+
-Pandroid.injected.signing.store.file=$(pwd)/release.jks \
59+
-Pandroid.injected.signing.store.password="${KEYSTORE_PASSWORD}" \
60+
-Pandroid.injected.signing.key.alias="${KEYSTORE_KEY_ALIAS}" \
61+
-Pandroid.injected.signing.key.password="${KEYSTORE_KEY_PASSWORD}"
62+
env:
63+
GRADLE_OPTS: "-Djava.net.preferIPv4Stack=true"
64+
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
65+
KEYSTORE_KEY_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
66+
KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD }}
67+
68+
- name: Extract update priority
69+
id: priority
70+
run: |
71+
UPDATE_PRIORITY=$(grep 'updatePriority' apps/teacher/build.gradle | head -1 | awk '{print $NF}')
72+
echo "value=${UPDATE_PRIORITY}" >> "$GITHUB_OUTPUT"
73+
74+
- name: Upload to Google Play
75+
uses: r0adkll/upload-google-play@v1
76+
with:
77+
serviceAccountJsonPlainText: ${{ secrets.GPLAY_SERVICE_ACCOUNT_KEY }}
78+
packageName: com.instructure.teacher
79+
releaseFiles: apps/teacher/build/outputs/bundle/prodRelease/teacher-prod-release.aab
80+
track: internal
81+
inAppUpdatePriority: ${{ steps.priority.outputs.value }}
82+
status: completed
83+
84+
- name: Cleanup sensitive files
85+
if: always()
86+
run: rm -f release.jks

0 commit comments

Comments
 (0)