Files
MapLibreParticleLab/.github/workflows/update-gl-js.yml
2022-09-08 17:10:35 +02:00

57 lines
1.5 KiB
YAML

name: update-gl-js
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit'
required: true
default: '49bc4ca45'
jobs:
update-gl-js:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 10
- name: Setup git and create branch
run: |
git config --global user.email "mail@example.com"
git config --global user.name "GitHub Action"
git checkout -b update-gl-js-to-${{ github.event.inputs.commit }}
- name: Checkout MapLibre GL JS
working-directory: maplibre-gl-js
run: |
git checkout ${{ github.event.inputs.commit }}
yarn install
- name: Generate code for main repo
run: |
npm ci --ignore-scripts
node scripts/generate-shaders.js
- name: Generate code for iOS
working-directory: platform/ios
run: |
npm install --ignore-scripts
node platform/darwin/scripts/generate-style-code.js
node platform/darwin/scripts/update-examples.js
- name: Commit and push changes
run: |
git add -u
git commit -m "Update MapLibre GL JS to ${{ github.event.inputs.commit }}"
git push --set-upstream origin update-gl-js-to-${{ github.event.inputs.commit }}
- name: Create pull request
run: gh pr create --base main --fill
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}