Skip to content

Make language files pass #768

Make language files pass

Make language files pass #768

name: Node.js CI
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: h5p-ndla-virtual-tour
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.X"
- run: |
cd h5p-ndla-virtual-tour
npm ci
npm run build
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.X"
- run: |
mkdir -p dist
cd dist
while read -r repo; do git clone ${repo}; done < ../h5p-ndla-virtual-tour/build_info/repos
if [ -d "h5p-editor-audio-recorder" ]; then pushd h5p-editor-audio-recorder && npm ci && npm run build; popd; fi
if [ -d "h5p-editor-ndla-virtual-tour" ]; then pushd h5p-editor-ndla-virtual-tour && npm ci && npm run build; popd; fi
cp -r ../h5p-ndla-virtual-tour .
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
- run: |
cd dist
ls
npm install -g h5p
h5p pack -r h5p-ndla-virtual-tour h5p-ndla-virtual-tour.h5p
h5p validate h5p-ndla-virtual-tour.h5p
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: h5p-ndla-virtual-tour.h5p
path: dist/h5p-ndla-virtual-tour.h5p
- name: Load library.json
id: set_library
run: |
ls
JSON=$(cat ./h5p-ndla-virtual-tour/library.json)
JSON="${JSON//'%'/%25}"
JSON="${JSON//$'\n'/%0A}"
JSON="${JSON//$'\r'/%0D}"
echo "::set-output name=library::${JSON}"
- uses: "marvinpinto/action-automatic-releases@latest" # https://github.com/marvinpinto/actions/tree/master/packages/automatic-releases
if: ${{ github.ref == 'refs/heads/master' }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: |
${{
format(
'v{0}.{1}.{2}',
fromJson(steps.set_library.outputs.library).majorVersion,
fromJson(steps.set_library.outputs.library).minorVersion,
fromJson(steps.set_library.outputs.library).patchVersion
)
}}
prerelease: false
files: |
dist/h5p-ndla-virtual-tour.h5p