Skip to content

update effekt compiler #27

update effekt compiler

update effekt compiler #27

name: update effekt compiler
on:
# can only be triggered manually
workflow_dispatch:
inputs:
effekt_commit:
description: "Commit SHA of Effekt submodule to checkout and build. If omitted, the latest commit is chosen. (OPTIONAL)"
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Scala & sbt
uses: olafurpg/setup-scala@v11
with:
java-version: [email protected]
- name: Setup nodejs
uses: actions/setup-node@v4
with:
node-version: 16
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Update submodule
run: |
git submodule update --recursive --remote --init
- name: Checkout given commit
if: "${{ github.event.inputs.effekt_commit != '' }}"
run: |
git -C effekt/ checkout ${{ github.event.inputs.effekt_commit }}
- name: Build Effekt JS
run: |
cd effekt/
sbt assembleJS
cp -f out/effekt.js ../src/effekt.js
- name: Run webpack
run: |
npm install
npx webpack
- name: Open Pull Request
# here we have to make sure that trigger event is on 'manual'
# since 'on push' could cause a infinite loop of actions triggering each other
if: github.event_name == 'workflow_dispatch'
uses: peter-evans/create-pull-request@v5
with:
add-paths: |
src/
dist/
effekt/
commit-message: "Github Action: update compiler"
base: master
branch: action/update-compiler
title: "[Github Action] Update compiler"
body: "Update Effekt compiler on the website."
reviewers: |
b-studios
dvdvgt
draft: false