51 lines
1.0 KiB
YAML
51 lines
1.0 KiB
YAML
name: build
|
|
description: Build plugin via yarn & make
|
|
|
|
inputs:
|
|
go_version:
|
|
required: false
|
|
description: 'GO version'
|
|
node_version:
|
|
required: false
|
|
description: 'Node.js version'
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: ci/setup-go
|
|
uses: actions/setup-go@v4
|
|
if: ${{ inputs.go_version }}
|
|
with:
|
|
go-version: "${{ inputs.go_version }}"
|
|
cache-dependency-path: |
|
|
go.sum
|
|
server/go.sum
|
|
|
|
- name: ci/setup-node
|
|
uses: actions/setup-node@v4
|
|
if: ${{ inputs.node_version }}
|
|
with:
|
|
node-version: "${{ inputs.node_version }}"
|
|
# TODO cache yarn
|
|
# cache: "yarn"
|
|
# cache-dependency-path: yarn.lock
|
|
|
|
# TODO tests
|
|
# - name: ci/plugin-test
|
|
|
|
- name: ci/install-deps
|
|
if: ${{ inputs.node_version }}
|
|
shell: bash
|
|
run: |
|
|
echo "::group::yarn"
|
|
cd webapp
|
|
yarn install
|
|
echo "::endgroup::"
|
|
|
|
- name: ci/plugin-build
|
|
shell: bash
|
|
run: |
|
|
echo "::group::dist"
|
|
make dist
|
|
echo "::endgroup::"
|