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
0de291fc87
commit
10f87b881d
2 changed files with 18 additions and 3 deletions
18
.github/scripts/release.sh
vendored
18
.github/scripts/release.sh
vendored
|
@ -25,6 +25,24 @@ GIT_TOKEN=$1
|
||||||
WORK_DIR=$2
|
WORK_DIR=$2
|
||||||
VERSION_TYPE=$3 # possible values: major, minor, patch
|
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"
|
BUILD_DIRECTORY="$WORK_DIR/build"
|
||||||
RELEASE_DIRECTORY="$BUILD_DIRECTORY/releases"
|
RELEASE_DIRECTORY="$BUILD_DIRECTORY/releases"
|
||||||
|
|
||||||
|
|
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
@ -10,9 +10,6 @@
|
||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
types: [closed]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version_type:
|
version_type:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue