Skip to content

Commit

Permalink
Merge pull request #127 from learningequality/yes_logo
Browse files Browse the repository at this point in the history
Update logos
  • Loading branch information
marcellamaki committed May 1, 2024
2 parents e07e8dd + e7562c6 commit 66efddf
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/build_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ on:
workflow_call:
inputs:
whl-file-name:
required: true
required: false
type: string
whl-url:
required: false
type: string
ref:
description: 'A ref for this workflow to check out its own repo'
required: true
required: false
type: string
release:
description: 'Is this a release asset?'
Expand All @@ -46,7 +49,7 @@ on:

jobs:
build_dmg:
runs-on: macos-latest
runs-on: macos-13
outputs:
dmg-file-name: ${{ steps.get-dmg-filename.outputs.dmg-file-name }}
env:
Expand All @@ -55,6 +58,11 @@ jobs:
PYTHON_VERSION: "3.10.10"
MACOSX_DEPLOYMENT_TARGET: "10.9"
steps:
- name: Validate whl reference inputs
if: ${{ (inputs.whl-file-name && inputs.whl-url) || (!inputs.whl-file-name && !inputs.whl-url) }}
run: |
echo "Must specify exactly one reference for the whl file to build the EXE with."
exit 1
- uses: actions/checkout@v4
if: ${{ !inputs.ref }}
- uses: actions/checkout@v4
Expand Down Expand Up @@ -85,8 +93,8 @@ jobs:
- name: Install dependencies
run: make dependencies
- name: Download the whlfile from URL and install
if: ${{ github.event.inputs.whl-url }}
run: make get-whl whl=${{ github.event.inputs.whl-url }}
if: ${{ inputs.whl-url }}
run: make get-whl whl=${{ inputs.whl-url }}
- name: Download the whlfile from artifacts
if: ${{ inputs.whl-file-name }}
uses: actions/download-artifact@v4
Expand All @@ -97,7 +105,7 @@ jobs:
if: ${{ inputs.whl-file-name }}
run: make install-whl whl=whl/${{ inputs.whl-file-name }}
- name: Setup app signing certificate
if: ${{ inputs.release == true || github.event.inputs.release == 'true' }}
if: ${{ inputs.release }}
env:
KEYCHAIN_PASSWORD: ${{ hashFiles('*')}}
run: |
Expand All @@ -114,15 +122,15 @@ jobs:
- name: Build the app
run: make build-mac-app
- name: Codesign the app
if: ${{ inputs.release == true || github.event.inputs.release == 'true' }}
if: ${{ inputs.release }}
run: MAC_CODESIGN_IDENTITY="${{ secrets.KOLIBRI_MAC_APP_IDENTITY }}" make codesign-mac-app
- name: Build the DMG
run: make build-dmg
- name: Codesign the DMG
if: ${{ inputs.release == true || github.event.inputs.release == 'true' }}
if: ${{ inputs.release }}
run: MAC_CODESIGN_IDENTITY="${{ secrets.KOLIBRI_MAC_APP_IDENTITY }}" make codesign-dmg
- name: Notarize the DMG
if: ${{ inputs.release == true || github.event.inputs.release == 'true' }}
if: ${{ inputs.release }}
env:
MAC_NOTARIZE_USERNAME: ${{ secrets.KOLIBRI_MAC_APP_USERNAME }}
MAC_NOTARIZE_PASSWORD: ${{ secrets.KOLIBRI_MAC_APP_PASSWORD }}
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build DMG for PRs

on:
pull_request:
branches:
- main

jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
latest_kolibri_release:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
outputs:
whl-url: ${{ steps.get_latest_kolibri_release.outputs.result }}
steps:
- name: Get latest Kolibri release
id: get_latest_kolibri_release
uses: actions/github-script@v7
with:
result-encoding: string
script: |
const { data: releases } = await github.rest.repos.listReleases({
owner: 'learningequality',
repo: 'kolibri',
per_page: 1,
page: 1,
});
const latestRelease = releases[0];
const whlAsset = latestRelease.assets.find(asset => asset.name.endsWith('.whl'));
const whlUrl = whlAsset.browser_download_url;
return whlUrl;
build_dmg:
name: Build Unsigned DMG
needs: [pre_job, latest_kolibri_release]
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
uses: ./.github/workflows/build_mac.yml
with:
whl-url: ${{ needs.latest_kolibri_release.outputs.whl-url }}
Binary file modified icons/Layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/kolibri-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icons/kolibri.icns
Binary file not shown.
Binary file modified icons/kolibri.ico
Binary file not shown.

0 comments on commit 66efddf

Please sign in to comment.