Add pnpm #17
63
.gitea/actions/plugin/build-achievements/action.yml
Normal file
63
.gitea/actions/plugin/build-achievements/action.yml
Normal 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::"
|
||||||
@@ -98,7 +98,7 @@ jobs:
|
|||||||
echo "EXPERIMENTAL=$(jq -r '.props.experimental == true' plugin.json)" >> "$GITHUB_OUTPUT"
|
echo "EXPERIMENTAL=$(jq -r '.props.experimental == true' plugin.json)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: ci/plugin-build
|
- 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:
|
with:
|
||||||
go_version: ${{ inputs.go_version }}
|
go_version: ${{ inputs.go_version }}
|
||||||
go_cache: ${{ inputs.go_cache }}
|
go_cache: ${{ inputs.go_cache }}
|
||||||
|
|||||||
Reference in New Issue
Block a user