Skip to content

Commit

Permalink
Merge pull request #5 from MonerooHQ/feature/dev-728-support-woocomme…
Browse files Browse the repository at this point in the history
…rce-payment-gateways-with-woocommerce

Feature/dev 728 support woocommerce payment gateways with woocommerce
  • Loading branch information
EliasElimah committed Jul 21, 2024
2 parents e56b7ef + d5f2388 commit 6ee4b7e
Show file tree
Hide file tree
Showing 15 changed files with 20,460 additions and 357 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish
on:
push:
tags:
- "*.*" # Push events to matching *.* tags only
- "*.*" # Push events to matching *.* tags only

env:
SVN_REPOSITORY: "https://plugins.svn.wordpress.org/moneroo-woocommerce"
Expand All @@ -29,6 +29,26 @@ jobs:
- name: Install dependencies
run: composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Cache npm modules
id: npm-cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
run: npm install

- name: Build project
run: npm run build

publish:
needs: build
runs-on: ubuntu-latest
Expand All @@ -49,15 +69,15 @@ jobs:
ZIP_FILE="$PLUGIN_BUILDS_PATH/$PLUGIN-$VERSION.zip"
PLUGIN_SLUG="moneroo-for-woocommerce"
echo "Building plugin file, version $VERSION"
# Replace the version in these 2 files.
sed -i -e "s/__STABLE_TAG__/$VERSION/g" ./readme.txt
sed -i -e "s/__STABLE_TAG__/$VERSION/g" "./$PLUGIN_SLUG.php"
mkdir -p $PLUGIN_BUILDS_PATH
zip -r $ZIP_FILE . -x "build-cfg/*" "builds/*" ".*" "wp-assets/*" "build/*" "phpunit.xml.dist" "unused-scanner.php" "composer.json" "composer.lock" "README.md" ".php-cs-fixer.dist.php" "phpstan.neon" "phpunit.xml"
zip -r $ZIP_FILE . -x "build-cfg/*" "builds/*" ".*" "wp-assets/*" "node_modules/*" "phpunit.xml.dist" "unused-scanner.php" "composer.json" "composer.lock" "README.md" ".php-cs-fixer.dist.php" "phpstan.neon" "phpunit.xml" "src/index.js" "pnpm-lock.yaml" "test.sh" "package-lock.json" "package.json"
if [ ! -f "$ZIP_FILE" ]; then
echo "Built zip file $ZIP_FILE does not exist" 1>&2
Expand All @@ -69,7 +89,7 @@ jobs:
echo "Built zip file $PLUGIN_BUILDS_PATH/moneroo.zip does not exist" 1>&2
exit 1
fi
echo "Plugin file $PLUGIN_BUILDS_PATH/moneroo.zip successfully built"

echo "ZIP_FILE=$PLUGIN_BUILDS_PATH/moneroo.zip" >> $GITHUB_OUTPUT
Expand All @@ -95,7 +115,7 @@ jobs:
ZIP_FILE="$PLUGIN_BUILDS_PATH/$PLUGIN-$VERSION.zip"
TMP_DIR="$PLUGIN_BUILDS_PATH/tmp"
PLUGIN_DIR="$TMP_DIR/$PLUGIN"
mkdir -p $PLUGIN_DIR
unzip -q $ZIP_FILE -d $TMP_DIR
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/check-php-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Check Code Style

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
check-style:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.2.0
uses: dependabot/fetch-metadata@v1.6.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ vendor/
.php-cs-fixer.php
build
.DS_Store
pnpm-lock.yaml
builds
node_modules
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moneroo/moneroo-woocommerce",
"description": "Kkiapay is developer friendly solution that allows you to accept mobile money and credit card, and direct bank payments in your application or website. Before using this plugin, make sure you have a right Merchant Account on Kkiapay, otherwise go and create your account. It is free and without pain.",
"license": "GPL-2.0",
"authors": [
{
"name": "Axa Zara Core Dev",
Expand Down
Loading

0 comments on commit 6ee4b7e

Please sign in to comment.