v0.17.0-rc3 #61
Workflow file for this run
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
name: Release Kolibri | |
on: | |
release: | |
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 | |
upload_whl: | |
uses: ./.github/workflows/upload_github_release_asset.yml | |
needs: whl | |
with: | |
filename: ${{ needs.whl.outputs.whl-file-name }} | |
release_id: ${{ github.event.release.id }} | |
upload_tar: | |
uses: ./.github/workflows/upload_github_release_asset.yml | |
needs: whl | |
with: | |
filename: ${{ needs.whl.outputs.tar-file-name }} | |
release_id: ${{ github.event.release.id }} | |
pex: | |
name: Build PEX file | |
needs: whl | |
uses: ./.github/workflows/build_pex.yml | |
with: | |
whl-file-name: ${{ needs.whl.outputs.whl-file-name }} | |
upload_pex: | |
uses: ./.github/workflows/upload_github_release_asset.yml | |
needs: pex | |
with: | |
filename: ${{ needs.pex.outputs.pex-file-name }} | |
release_id: ${{ github.event.release.id }} | |
dmg: | |
name: Build DMG file | |
needs: whl | |
uses: learningequality/kolibri-app/.github/workflows/[email protected] | |
with: | |
whl-file-name: ${{ needs.whl.outputs.whl-file-name }} | |
release: true | |
ref: v0.4.3 | |
secrets: | |
KOLIBRI_MAC_APP_IDENTITY: ${{ secrets.KOLIBRI_MAC_APP_IDENTITY }} | |
KOLIBRI_MAC_APP_CERTIFICATE: ${{ secrets.KOLIBRI_MAC_APP_CERTIFICATE }} | |
KOLIBRI_MAC_APP_CERTIFICATE_PASSWORD: ${{ secrets.KOLIBRI_MAC_APP_CERTIFICATE_PASSWORD }} | |
KOLIBRI_MAC_APP_USERNAME: ${{ secrets.KOLIBRI_MAC_APP_USERNAME }} | |
KOLIBRI_MAC_APP_PASSWORD: ${{ secrets.KOLIBRI_MAC_APP_PASSWORD }} | |
KOLIBRI_MAC_APP_TEAM_ID: ${{ secrets.KOLIBRI_MAC_APP_TEAM_ID }} | |
upload_dmg: | |
uses: ./.github/workflows/upload_github_release_asset.yml | |
needs: dmg | |
with: | |
filename: ${{ needs.dmg.outputs.dmg-file-name }} | |
release_id: ${{ github.event.release.id }} | |
deb: | |
name: Build DEB file | |
needs: whl | |
uses: learningequality/kolibri-installer-debian/.github/workflows/[email protected] | |
with: | |
tar-file-name: ${{ needs.whl.outputs.tar-file-name }} | |
ref: v0.16.1 | |
upload_deb: | |
uses: ./.github/workflows/upload_github_release_asset.yml | |
needs: deb | |
with: | |
filename: ${{ needs.deb.outputs.deb-file-name }} | |
release_id: ${{ github.event.release.id }} | |
exe: | |
name: Build EXE file | |
needs: whl | |
uses: learningequality/kolibri-installer-windows/.github/workflows/[email protected] | |
with: | |
whl-file-name: ${{ needs.whl.outputs.whl-file-name }} | |
release: true | |
ref: v1.6.4 | |
secrets: | |
KOLIBRI_WINDOWS_INSTALLER_CERTIFICATE: ${{ secrets.KOLIBRI_WINDOWS_INSTALLER_CERTIFICATE }} | |
KOLIBRI_WINDOWS_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.KOLIBRI_WINDOWS_INSTALLER_CERTIFICATE_PASSWORD }} | |
upload_exe: | |
uses: ./.github/workflows/upload_github_release_asset.yml | |
needs: exe | |
with: | |
filename: ${{ needs.exe.outputs.exe-file-name }} | |
release_id: ${{ github.event.release.id }} | |
zip: | |
name: Build Raspberry Pi Image | |
needs: deb | |
uses: learningequality/pi-gen/.github/workflows/[email protected] | |
with: | |
deb-file-name: ${{ needs.deb.outputs.deb-file-name }} | |
ref: v0.16.1 | |
upload_zip: | |
uses: ./.github/workflows/upload_github_release_asset.yml | |
needs: zip | |
with: | |
filename: ${{ needs.zip.outputs.zip-file-name }} | |
release_id: ${{ github.event.release.id }} | |
apk: | |
name: Build Android APK | |
needs: whl | |
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected] | |
with: | |
tar-file-name: ${{ needs.whl.outputs.tar-file-name }} | |
release: true | |
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 }} | |
KOLIBRI_ANDROID_APP_PRODUCTION_KEYALIAS_PASSWORD: ${{ secrets.KOLIBRI_ANDROID_APP_PRODUCTION_KEYALIAS_PASSWORD }} | |
KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON: ${{ secrets.KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON }} | |
upload_apk: | |
uses: ./.github/workflows/upload_github_release_asset.yml | |
needs: apk | |
with: | |
filename: ${{ needs.apk.outputs.apk-file-name }} | |
release_id: ${{ github.event.release.id }} | |
test_pypi_upload: | |
name: Upload to TestPyPi | |
needs: whl | |
uses: ./.github/workflows/pypi_upload.yml | |
with: | |
whl-file-name: ${{ needs.whl.outputs.whl-file-name }} | |
tar-file-name: ${{ needs.whl.outputs.tar-file-name }} | |
test: true | |
secrets: | |
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
TESTPYPI_API_TOKEN: ${{ secrets.TESTPYPI_API_TOKEN }} | |
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
gcs_upload: | |
name: Upload to Google Cloud Storage for LE Downloads | |
runs-on: ubuntu-latest | |
needs: [whl, pex, dmg, deb, exe, zip, apk] | |
strategy: | |
matrix: | |
filename: [ | |
'${{ needs.whl.outputs.whl-file-name }}', | |
'${{ needs.whl.outputs.tar-file-name }}', | |
'${{ needs.pex.outputs.pex-file-name }}', | |
'${{ needs.dmg.outputs.dmg-file-name }}', | |
'${{ needs.deb.outputs.deb-file-name }}', | |
'${{ needs.exe.outputs.exe-file-name }}', | |
'${{ needs.zip.outputs.zip-file-name }}', | |
'${{ needs.apk.outputs.apk-file-name }}', | |
] | |
steps: | |
- name: Download ${{ matrix.filename }} artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.filename }} | |
path: dist | |
- 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 files to Google Cloud Storage | |
uses: 'google-github-actions/upload-cloud-storage@v2' | |
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 -j dist/${{ needs.whl.outputs.whl-file-name }} 'kolibri/core/content/static/*' -d static | |
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] | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- run: echo "Release now publishing!" | |
pypi_upload: | |
name: Upload to PyPi | |
if: ${{ !github.event.release.prerelease }} | |
needs: [whl, block_release_step] | |
uses: ./.github/workflows/pypi_upload.yml | |
with: | |
whl-file-name: ${{ needs.whl.outputs.whl-file-name }} | |
tar-file-name: ${{ needs.whl.outputs.tar-file-name }} | |
test: false | |
secrets: | |
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
TESTPYPI_API_TOKEN: ${{ secrets.TESTPYPI_API_TOKEN }} | |
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
bck_gcs_upload: | |
name: Upload WHL file to Google Cloud Storage for BCK | |
needs: [block_release_step, whl, latest_release] | |
if: ${{ !github.event.release.prerelease && needs.latest_release.outputs.is_latest_release == 'true' }} | |
runs-on: ubuntu-latest | |
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_PROD_BUILD_ARTIFACT_GCS_BUCKET }}' | |
parent: false | |
android_release: | |
name: Release Android App | |
if: ${{ !github.event.release.prerelease }} | |
needs: [apk, block_release_step] | |
uses: learningequality/kolibri-installer-android/.github/workflows/[email protected] | |
with: | |
version-code: ${{ needs.apk.outputs.version-code }} | |
ref: v0.1.4 | |
secrets: | |
KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON: ${{ secrets.KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON }} |