diff --git a/README.md b/README.md index e5309af..d496b14 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ The file will be in your GitHub workspace after the action is run. **Required** Name of plugin, should almost always be the repo name, e.g. `koha-plugin-kitchen-sink` +### `koha-version` + +**Optional** Major and minor version of Koha. If this is passed in, it will be prepended to the plugin version + ## Outputs ### `filename` @@ -28,6 +32,7 @@ The name of the built kpz file with: release-version: ${{ steps.semvers.outputs.v_patch }} release-name: ${{ steps.myvars.outputs.GITHUB_REPO }} + koha-version: 19.11 ``` Take a look at https://github.com/bywatersolutions/koha-plugin-kitchen-sink/blob/master/.github/workflows/main.yml for a real world usage. diff --git a/action.yml b/action.yml index b2b1eb0..3f61c2d 100644 --- a/action.yml +++ b/action.yml @@ -19,3 +19,4 @@ runs: args: - ${{ inputs.release-version }} - ${{ inputs.release-name }} + - ${{ inputs.koha-version }} diff --git a/entrypoint.sh b/entrypoint.sh index 7181fa0..9d5e7f2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,6 +2,11 @@ PLUGIN_VERSION=$1 PLUGIN_NAME=$2 +KOHA_VERSION=$3 + +if [ -z "$KOHA_VERSION" ] + PLUGIN_VERSION="$KOHA_VERSION.$PLUGIN_VERSION" +fi RELEASE_FILENAME="${PLUGIN_NAME}-${PLUGIN_VERSION}.kpz" TODAY_ISO=$(date '+%Y-%m-%d') @@ -27,6 +32,7 @@ zip -r ../${RELEASE_FILENAME} ./Koha cd .. rm -rf dist +echo "KOHA VERSION: $KOHA_VERSION" echo "PLUGIN VERSION: $PLUGIN_VERSION" echo "PLUGIN NAME: $PLUGIN_NAME" echo "TODAY ISO: $TODAY_ISO"