mirror of
https://github.com/wso2/open-mcp-auth-proxy.git
synced 2025-06-27 17:13:31 +00:00
Configure the release to be triggered on workflow dispatch only
This commit is contained in:
parent
234ef377da
commit
161223fd73
2 changed files with 18 additions and 10 deletions
25
.github/scripts/release.sh
vendored
25
.github/scripts/release.sh
vendored
|
@ -12,18 +12,29 @@
|
|||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Check the number of arguments passed.
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "Error: Invalid or insufficient arguments provided!" >&2
|
||||
echo "Usage: $0 <GITHUB_TOKEN> <WORK_DIR>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Assign command line arguments to variables.
|
||||
GIT_TOKEN=$1
|
||||
WORK_DIR=$2
|
||||
VERSION_TYPE=$3 # possible values: major, minor, patch
|
||||
|
||||
Check if GIT_TOKEN is empty
|
||||
if [ -z "$GIT_TOKEN" ]; then
|
||||
echo "❌ Error: GIT_TOKEN is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if WORK_DIR is empty
|
||||
if [ -z "$WORK_DIR" ]; then
|
||||
echo "❌ Error: WORK_DIR is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate VERSION_TYPE
|
||||
if [[ "$VERSION_TYPE" != "major" && "$VERSION_TYPE" != "minor" && "$VERSION_TYPE" != "patch" ]]; then
|
||||
echo "❌ Error: VERSION_TYPE must be one of: major, minor, or patch."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BUILD_DIRECTORY="$WORK_DIR/build"
|
||||
RELEASE_DIRECTORY="$BUILD_DIRECTORY/releases"
|
||||
|
||||
|
|
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
@ -10,9 +10,6 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
types: [closed]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version_type:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue