50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
name: json
|
|
description: Build plugin json for marketplace
|
|
|
|
inputs:
|
|
plugin_id:
|
|
required: true
|
|
description: 'Plugin id'
|
|
plugin_version:
|
|
required: true
|
|
description: 'Plugin version'
|
|
enterprise:
|
|
required: true
|
|
description: 'Is plugin enterprise'
|
|
beta:
|
|
required: true
|
|
description: 'Is plugin beta'
|
|
experimental:
|
|
required: true
|
|
description: 'Is plugin experimental'
|
|
artifacts_url:
|
|
required: true
|
|
description: 'Artifacts URL'
|
|
artifacts_repository:
|
|
required: true
|
|
description: 'Artifacts repository'
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: ci/install-marketplace
|
|
shell: bash
|
|
run: |
|
|
git clone --branch production https://github.com/mattermost/mattermost-marketplace.git ./marketplace
|
|
git -C ./marketplace reset --hard 3d2177a488d01887de993364c36afc62cd7ab416
|
|
echo [] > ./marketplace/plugins.json
|
|
|
|
- name: ci/add-json
|
|
shell: bash
|
|
run: |
|
|
cd marketplace
|
|
args=""
|
|
if [ "${{ inputs.enterprise }}" = true ]; then args+=" --enterprise"; fi
|
|
if [ "${{ inputs.beta }}" = true ]; then args+=" --beta"; fi
|
|
if [ "${{ inputs.experimental }}" = true ]; then args+=" --experimental"; fi
|
|
go run ./cmd/generator/ add ${{ inputs.plugin_id }} ${{ inputs.plugin_version }} --official --remote-plugin-store=${{ inputs.artifacts_url }}/repository/${{ inputs.artifacts_repository }}/plugins/${{ inputs.plugin_id }}/${{ inputs.plugin_version }} $args
|
|
|
|
- name: ci/extract-json
|
|
shell: bash
|
|
run: jq '.[0] | .author_type = "loop"' ./marketplace/plugins.json >> ./dist/${{ inputs.plugin_id }}-${{ inputs.plugin_version }}.tar.gz.json
|