mirror of
https://github.com/walter-base/common-workflow.git
synced 2026-09-08 19:26:46 -04:00
Merge pull request #11 from walter-base/fix/require-release-package-names
This commit is contained in:
@@ -48,6 +48,11 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: skills .claude-plugin .cursor-plugin .agents plugins README.md CHANGELOG.md
|
default: skills .claude-plugin .cursor-plugin .agents plugins README.md CHANGELOG.md
|
||||||
|
catalog_file:
|
||||||
|
description: Optional catalog metadata JSON file to publish beside the release artifacts.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
archive_name:
|
archive_name:
|
||||||
description: Prefix used for the release archive.
|
description: Prefix used for the release archive.
|
||||||
required: true
|
required: true
|
||||||
@@ -183,13 +188,19 @@ jobs:
|
|||||||
VERSION: ${{ needs.release-please.outputs.version }}
|
VERSION: ${{ needs.release-please.outputs.version }}
|
||||||
PACKAGE_PATHS: ${{ inputs.package_paths }}
|
PACKAGE_PATHS: ${{ inputs.package_paths }}
|
||||||
ARCHIVE_NAME: ${{ inputs.archive_name }}
|
ARCHIVE_NAME: ${{ inputs.archive_name }}
|
||||||
|
CATALOG_FILE: ${{ inputs.catalog_file }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
dir="${ARCHIVE_NAME}-${VERSION}"
|
dir="${ARCHIVE_NAME}-${VERSION}"
|
||||||
mkdir -p "dist/${dir}"
|
mkdir -p "dist/${dir}"
|
||||||
for path in ${PACKAGE_PATHS}; do
|
for path in ${PACKAGE_PATHS}; do
|
||||||
cp -R "$path" "dist/${dir}/"
|
cp -R "$path" "dist/${dir}/"
|
||||||
done
|
done
|
||||||
|
if [[ -n "$CATALOG_FILE" ]]; then
|
||||||
|
jq empty "$CATALOG_FILE"
|
||||||
|
cp "$CATALOG_FILE" dist/catalog.json
|
||||||
|
fi
|
||||||
tar -czf "dist/${ARCHIVE_NAME}-${VERSION}.tar.gz" -C dist "${dir}"
|
tar -czf "dist/${ARCHIVE_NAME}-${VERSION}.tar.gz" -C dist "${dir}"
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
@@ -435,6 +446,7 @@ jobs:
|
|||||||
GITEA_URL: ${{ inputs.gitea_url }}
|
GITEA_URL: ${{ inputs.gitea_url }}
|
||||||
GITEA_USER: ${{ inputs.gitea_user }}
|
GITEA_USER: ${{ inputs.gitea_user }}
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
CATALOG_FILE: ${{ inputs.catalog_file }}
|
||||||
VERSION: ${{ needs.release-please.outputs.version }}
|
VERSION: ${{ needs.release-please.outputs.version }}
|
||||||
run: |
|
run: |
|
||||||
: "${GITEA_URL:?Set gitea_url when publish_gitea is enabled}"
|
: "${GITEA_URL:?Set gitea_url when publish_gitea is enabled}"
|
||||||
@@ -443,9 +455,14 @@ jobs:
|
|||||||
archive="${ARCHIVE_NAME}-${VERSION}.tar.gz"
|
archive="${ARCHIVE_NAME}-${VERSION}.tar.gz"
|
||||||
installer="install-${ARCHIVE_NAME}-${VERSION}.sh"
|
installer="install-${ARCHIVE_NAME}-${VERSION}.sh"
|
||||||
package_base="${GITEA_URL%/}/api/packages/${GITEA_USER}/generic/${GITEA_PACKAGE_NAME}/${VERSION}"
|
package_base="${GITEA_URL%/}/api/packages/${GITEA_USER}/generic/${GITEA_PACKAGE_NAME}/${VERSION}"
|
||||||
for upload in \
|
uploads=(
|
||||||
"dist/${archive}|${package_base}/${archive}" \
|
"dist/${archive}|${package_base}/${archive}"
|
||||||
"dist/${installer}|${package_base}/${installer}"; do
|
"dist/${installer}|${package_base}/${installer}"
|
||||||
|
)
|
||||||
|
if [[ -n "$CATALOG_FILE" ]]; then
|
||||||
|
uploads+=("dist/catalog.json|${package_base}/catalog.json")
|
||||||
|
fi
|
||||||
|
for upload in "${uploads[@]}"; do
|
||||||
file="${upload%%|*}"
|
file="${upload%%|*}"
|
||||||
url="${upload#*|}"
|
url="${upload#*|}"
|
||||||
curl --fail-with-body --retry 3 \
|
curl --fail-with-body --retry 3 \
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ This repository intentionally contains only generic marketplace automation:
|
|||||||
- skill and plugin manifest validation
|
- skill and plugin manifest validation
|
||||||
- pull-request preview archives
|
- pull-request preview archives
|
||||||
- release archives and installation summaries
|
- release archives and installation summaries
|
||||||
|
- optional catalog metadata published beside release artifacts
|
||||||
- optional npm registry publishing for agents that support npm catalogs
|
- optional npm registry publishing for agents that support npm catalogs
|
||||||
|
|
||||||
Container, infrastructure, deployment, and environment-specific workflows are
|
Container, infrastructure, deployment, and environment-specific workflows are
|
||||||
@@ -38,6 +39,10 @@ Agents can, however, resolve npm packages on their own, so publishing the same
|
|||||||
release contents to an npm registry lets them install and update without an
|
release contents to an npm registry lets them install and update without an
|
||||||
installer.
|
installer.
|
||||||
|
|
||||||
|
Release callers may pass `catalog_file` to publish a validated `catalog.json`
|
||||||
|
beside the Generic package archive and installer. The file is also included in
|
||||||
|
the archive when its path is listed in `package_paths`.
|
||||||
|
|
||||||
Enable it on the release workflow:
|
Enable it on the release workflow:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user