Add update-gl-js.yml workflow (#315)
* Add `update-gl-js.yml` workflow * Add `update-gl-js.yml` workflow
This commit is contained in:
56
.github/workflows/update-gl-js.yml
vendored
Normal file
56
.github/workflows/update-gl-js.yml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
name: update-gl-js
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
commit:
|
||||
description: 'Commit'
|
||||
required: true
|
||||
default: '49bc4ca45'
|
||||
|
||||
jobs:
|
||||
update-gl-js:
|
||||
runs-on: macos-10.15
|
||||
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}}
|
||||
Reference in New Issue
Block a user