forked from learningequality/kolibri
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into gsoc-table
- Loading branch information
Showing
756 changed files
with
59,564 additions
and
44,252 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
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
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 |
---|---|---|
|
@@ -55,7 +55,7 @@ jobs: | |
apk: | ||
name: Build APK file | ||
needs: whl | ||
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].3 | ||
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].4 | ||
with: | ||
tar-file-name: ${{ needs.whl.outputs.tar-file-name }} | ||
ref: v0.1.3 | ||
ref: v0.1.4 |
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 |
---|---|---|
|
@@ -5,6 +5,25 @@ on: | |
types: [published] | ||
|
||
jobs: | ||
latest_release: | ||
name: Check if this release is the latest release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
is_latest_release: ${{ steps.is_latest_release.outputs.result }} | ||
steps: | ||
- name: Check if the current release is the latest Kolibri release | ||
id: is_latest_release | ||
uses: actions/github-script@v7 | ||
with: | ||
result-encoding: string | ||
script: | | ||
const { data: latestRelease } = await github.rest.repos.getLatestRelease({ | ||
owner: 'learningequality', | ||
repo: 'kolibri', | ||
}); | ||
return latestRelease.tag_name === '${{ github.event.release.tag_name }}'; | ||
whl: | ||
name: Build WHL file | ||
uses: ./.github/workflows/build_whl.yml | ||
|
@@ -99,11 +118,11 @@ jobs: | |
apk: | ||
name: Build Android APK | ||
needs: whl | ||
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].3 | ||
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].4 | ||
with: | ||
tar-file-name: ${{ needs.whl.outputs.tar-file-name }} | ||
release: true | ||
ref: v0.1.3 | ||
ref: v0.1.4 | ||
secrets: | ||
KOLIBRI_ANDROID_APP_PRODUCTION_KEYSTORE: ${{ secrets.KOLIBRI_ANDROID_APP_PRODUCTION_KEYSTORE }} | ||
KOLIBRI_ANDROID_APP_PRODUCTION_KEYSTORE_PASSWORD: ${{ secrets.KOLIBRI_ANDROID_APP_PRODUCTION_KEYSTORE_PASSWORD }} | ||
|
@@ -160,13 +179,49 @@ jobs: | |
with: | ||
path: 'dist/${{ matrix.filename }}' | ||
destination: '${{ secrets.KOLIBRI_PUBLIC_RELEASE_GCS_BUCKET }}/downloads/kolibri/${{ github.event.release.name }}' | ||
bck_prerelease_gcs_upload: | ||
name: Upload WHL file to Google Cloud Storage for BCK Pre-release | ||
runs-on: ubuntu-latest | ||
needs: [whl] | ||
steps: | ||
- name: Download WHL artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ needs.whl.outputs.whl-file-name }} | ||
path: dist | ||
- name: Zip whl file | ||
run: zip -j dist/kolibri.zip dist/${{ needs.whl.outputs.whl-file-name }} | ||
- uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: '${{ secrets.GH_UPLOADER_GCP_SA_CREDENTIALS }}' | ||
- name: 'Set up Cloud SDK' | ||
uses: 'google-github-actions/setup-gcloud@v2' | ||
- name: Upload to BCK bucket | ||
uses: 'google-github-actions/upload-cloud-storage@v2' | ||
with: | ||
path: 'dist/kolibri.zip' | ||
destination: '${{ secrets.BCK_PRERELEASE_BUILD_ARTIFACT_GCS_BUCKET }}' | ||
parent: false | ||
- name: Unzip content static files from whl file | ||
run: | | ||
unzip dist/${{ needs.whl.outputs.whl-file-name }} 'kolibri/core/content/static/*' -d static | ||
mv static/kolibri/core/content/static/** static | ||
rm -rf static/kolibri | ||
rm static/**/*.file_size | ||
# Ungzip all .gz files in the static folder | ||
for f in static/**/*.gz; do gunzip -f $f; done | ||
- name: Upload content static files to BCK bucket | ||
uses: 'google-github-actions/upload-cloud-storage@v2' | ||
with: | ||
path: 'static' | ||
destination: '${{ secrets.STUDIO_BCK_CONTENT_STATIC_BUCKET }}' | ||
block_release_step: | ||
# This step ties to the release environment which requires manual approval | ||
# before it can execute. Once manual approval has been granted, the release is | ||
# unblocked and all the subsequent steps in this workflow will happen. | ||
name: Job to block publish of a release until it has been manually approved | ||
if: ${{ !github.event.release.prerelease }} | ||
needs: [whl, pex, dmg, deb, exe, test_pypi_upload] | ||
needs: [whl, pex, dmg, deb, exe, zip, apk, test_pypi_upload] | ||
runs-on: ubuntu-latest | ||
environment: release | ||
steps: | ||
|
@@ -187,9 +242,9 @@ jobs: | |
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | ||
bck_gcs_upload: | ||
name: Upload WHL file to Google Cloud Storage for BCK | ||
if: ${{ !github.event.release.prerelease && github.event.release.name == 'latest'}} | ||
needs: [block_release_step, whl, latest_release] | ||
if: ${{ !github.event.release.prerelease && needs.latest_release.outputs.is_latest_release == 'true' }} | ||
runs-on: ubuntu-latest | ||
needs: [block_release_step, whl] | ||
steps: | ||
- name: Download WHL artifact | ||
uses: actions/download-artifact@v4 | ||
|
@@ -213,9 +268,9 @@ jobs: | |
name: Release Android App | ||
if: ${{ !github.event.release.prerelease }} | ||
needs: [apk, block_release_step] | ||
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].3 | ||
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected].4 | ||
with: | ||
version-code: ${{ needs.apk.outputs.version-code }} | ||
ref: v0.1.3 | ||
ref: v0.1.4 | ||
secrets: | ||
KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON: ${{ secrets.KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_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
Oops, something went wrong.