Skip to content

Commit

Permalink
Add publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yanoandri committed Mar 5, 2025
1 parent 26bb712 commit e717f3a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .buddy/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
- pipeline: '[xendit-whmcs] Publish Plugin Notification'
trigger_mode: ON_EVERY_PUSH
ref_name: (refs/tags/v\d+\.\d+\.\d+$)
ref_type: WILDCARD
fetch_all_refs: true
trigger_condition: ALWAYS
worker_assignment: TAGS
variables:
- key: INVOICE_SLACK_GROUP
value: "@checkout-devs"
description: invoice slack group
- key: PUBLISH_URL
value: "https://marketplace.whmcs.com/product/6411/edit"
description: publish url
actions:
- action: Prepare Env Variables
type: BUILD
integration_hash: "5e85761fc5f225000f97dd99"
trigger_condition: ALWAYS
working_directory: "/buddy/xendit-whmcs"
region: ap-southeast-1
docker_image_name: "xendit/alpine"
docker_image_tag: "1.0"
execute_commands:
- set -e
- COMMIT_DATE_ISO="$(git show ${BUDDY_EXECUTION_REVISION} --format=%cd --date=iso | head -n 1)"
- export COMMIT_DATE=$(LC_TIME="C" TZ="Asia/Jakarta" date +'%y.%m.%d-%H.%M' --date="${COMMIT_DATE_ISO}")
- export RELEASE_TAG="${BUDDY_EXECUTION_REVISION_SHORT}-${COMMIT_DATE}-${APP_ENV_MODE}"
- export COMMIT_MESSAGE="$(git log -1 --pretty=oneline --abbrev-commit --format=\"%B\" | head -n 1)"
- export CHANGE_CAUSE="${RELEASE_TAG} - ${COMMIT_MESSAGE}"
- export VERSION_TAG="${BUDDY_EXECUTION_TAG}"
- export GIT_TAG="${BUDDY_EXECUTION_TAG}"
- export GIT_BRANCH="${BUDDY_EXECUTION_BRANCH}"
shell: BASH
- action: Notify deployment finished to tpi-plugin-release
type: SLACK
integration_hash: 5ea6524a42eba4000eb35fbb
trigger_condition: ALWAYS
channel: C08G5D33LE9
channel_name: tpi-plugin-release
attachments:
- '{"fallback":"$BUDDY_PIPELINE_NAME execution
#$BUDDY_EXECUTION_ID","color":"good","fields":[{"title":"*[$BUDDY_PROJECT_NAME]*","value":"✅ New version $VERSION_TAG of $BUDDY_PROJECT_NAME detected! \n Please edit the version inside the marketplace through [this link]($PUBLISH_URL) \n cc: $INVOICE_SLACK_GROUP","short":false}]}'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Blacklist files/folders in same directory as the .gitignore file
/*
vendor
/.vscode
/test.sh

# Whitelist some files
!.gitignore
Expand Down

0 comments on commit e717f3a

Please sign in to comment.