45 lines
1.7 KiB
YAML
45 lines
1.7 KiB
YAML
name: "WP Release CI"
|
|
description: "Package and publish a WordPress plugin/theme release to a Gitea release + self-hosted update channel."
|
|
|
|
# Consuming workflow MUST check out the source repo with fetch-depth: 0 BEFORE this
|
|
# step (git archive + the tag validation need full history and the tag ref).
|
|
#
|
|
# Minimal usage:
|
|
# - uses: actions/checkout@v4
|
|
# with: { fetch-depth: 0 }
|
|
# - uses: https://gitea.mulligan.casa/wordpress/wp-release-ci@v1 # full Gitea URL (a bare owner/repo resolves from github); pin the ref
|
|
# with:
|
|
# channel_deploy_key: ${{ secrets.CHANNEL_DEPLOY_KEY }}
|
|
#
|
|
# GITHUB_REPOSITORY / GITHUB_REF_NAME / GITHUB_SERVER_URL / GITHUB_TOKEN are provided
|
|
# automatically by the Actions runner and consumed by release.sh directly.
|
|
|
|
inputs:
|
|
channel_deploy_key:
|
|
description: "SSH private key with WRITE access to the channel repo. Required — the channel publish hard-fails without it."
|
|
required: true
|
|
channel_ssh_port:
|
|
description: "SSH port of the Gitea host for the channel push."
|
|
required: false
|
|
default: "30009"
|
|
channel_branch:
|
|
description: "Branch of the channel repo to publish to."
|
|
required: false
|
|
default: "main"
|
|
channel_git_name:
|
|
description: "Git committer name used for the channel push."
|
|
required: false
|
|
default: "release bot"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Release via wp-release-ci
|
|
shell: bash
|
|
env:
|
|
CHANNEL_DEPLOY_KEY: ${{ inputs.channel_deploy_key }}
|
|
CHANNEL_SSH_PORT: ${{ inputs.channel_ssh_port }}
|
|
CHANNEL_BRANCH: ${{ inputs.channel_branch }}
|
|
CHANNEL_GIT_NAME: ${{ inputs.channel_git_name }}
|
|
run: bash "${GITHUB_ACTION_PATH}/release.sh"
|