This commit is contained in:
2026-06-03 08:53:57 +03:00
parent 1a43bb9960
commit e2b7fc1e7e
2 changed files with 64 additions and 1 deletions

View File

@@ -0,0 +1,63 @@
name: build
description: Build plugin via yarn & make
inputs:
go_version:
required: false
description: 'GO version'
go_cache:
required: false
description: 'For direct disable go-cache if needed'
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 && inputs.go_cache != 'false' }}
with:
go-version: "${{ inputs.go_version }}"
cache-dependency-path: |
go.sum
server/go.sum
- name: ci/setup-go-wo-cache
uses: actions/setup-go@v4
if: ${{ inputs.go_version && inputs.go_cache == 'false' }}
with:
go-version: "${{ inputs.go_version }}"
cache: false
- name: Setup pnpm
uses: pnpm/action-setup@v4
- 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::"

View File

@@ -98,7 +98,7 @@ jobs:
echo "EXPERIMENTAL=$(jq -r '.props.experimental == true' plugin.json)" >> "$GITHUB_OUTPUT"
- name: ci/plugin-build
uses: https://git.wilix.dev/wilix-infra/actions/.gitea/actions/plugin/build@master
uses: https://git.wilix.dev/wilix-infra/actions/.gitea/actions/plugin/build-achievements@master
with:
go_version: ${{ inputs.go_version }}
go_cache: ${{ inputs.go_cache }}