-
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.
build: setup project to build client
- Loading branch information
0 parents
commit 36e3d65
Showing
4 changed files
with
71 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Kaltura Typescript Client build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Read .nvmrc | ||
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | ||
id: nvm | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "${{ steps.nvm.outputs.NVMRC }}" | ||
|
||
- name: Build | ||
run: ./build-kaltura-client.sh | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: kaltura-typescript-client-*.tgz | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
14.17.0 |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Kaltura Typescript Client (Build Repo) | ||
|
||
This is simply a repo to provide a publicly accessibly version of | ||
https://github.com/kaltura/KalturaGeneratedAPIClientsTypescript. From time to time it will build a | ||
required version of that client, and then 'publish' it as a 'release' on this repo. Not being the | ||
owner of the code, we do not publish it to NPM etc. But at least by using GitHub releases we can | ||
then have a HTTP URL we can use within other `package.json` dependency blocks. | ||
|
||
## Rationale | ||
|
||
For unknown reasons Kaltura do not publish this to NPM, however that makes it rather difficult for | ||
usage - especially if you want to do it in a module then used for a larger app (such as the Kaltura | ||
Simple Uploader module). So this simplifies these issues. | ||
|
||
## Usage | ||
|
||
Simply go to the release of interest, and then copy the resultant URL for the `tgz` of the build and | ||
use it in your `package.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
## Change these as required | ||
GITHUB_VER=17.2.0 | ||
CLIENT_VER=7.0.2 | ||
|
||
## Below will hopefully rarely need changing | ||
PROJECT_DIR=$(pwd) | ||
CLIENT_BUILD_DIR=kaltura-typescript-client | ||
DIST_FILE_PREFIX=kaltura-typescript-client-$CLIENT_VER | ||
|
||
# Make sure we start clean | ||
rm -rf $CLIENT_BUILD_DIR | ||
|
||
# Download, build and NPM install | ||
wget -O - https://github.com/kaltura/KalturaGeneratedAPIClientsTypescript/archive/v${GITHUB_VER}.tar.gz | \ | ||
tar --transform="s/KalturaGeneratedAPIClientsTypescript-${GITHUB_VER}/${CLIENT_BUILD_DIR}/" -zxv && \ | ||
cd $CLIENT_BUILD_DIR && \ | ||
npm install && \ | ||
npm run deploy && \ | ||
mv dist/$DIST_FILE_PREFIX*.tgz "$PROJECT_DIR" && \ | ||
cd "$PROJECT_DIR" || \ | ||
(echo "Failed to build Kaltura Typescript Client, aborting..."; exit 1;) |