Skip to content

Commit

Permalink
Add packaging script for plugin (#33)
Browse files Browse the repository at this point in the history
* Add packaging tools
  • Loading branch information
mbish authored Nov 8, 2023
1 parent b3ef7e0 commit 7630bb6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/wp_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- "*.X"
pull_request:
branches:
- main
Expand All @@ -18,15 +19,24 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@86e1ccdd8ddc47bffc29bf667143f363a4cdfdbc
with:
php-version: ${{ matrix.php }}
coverage: xdebug

- name: Composer install
run: composer install

- name: PHP tests
run: ./vendor/bin/phpunit --process-isolation tests
run: ./vendor/bin/phpunit --process-isolation tests

- name: Package duo-universal
run: ./package.sh

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: duo-universal
path: ./duo-universal.zip
4 changes: 2 additions & 2 deletions class-duouniversal-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function duo_settings_page() {
$this->duo_utils->duo_debug_log( 'Displaying duo setting page' );
?>
<div class="wrap">
<h2>Duo Universal Two-Factor Authentication</h2>
<h2>Duo Universal Authentication</h2>
<?php if ( is_multisite() ) { ?>
<form action="ms-options.php" method="post">
<?php } else { ?>
Expand Down Expand Up @@ -205,7 +205,7 @@ function duo_add_link( $links ) {

function duo_add_page() {
if ( ! is_multisite() ) {
add_options_page( 'Duo Universal Two-Factor', 'Duo Universal Two-Factor', 'manage_options', 'duo_universal_wordpress', array( $this, 'duo_settings_page' ) );
add_options_page( 'Duo Universal', 'Duo Universal', 'manage_options', 'duo_universal_wordpress', array( $this, 'duo_settings_page' ) );
}
}

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: '3.3'
version: "3.3"
services:
wordpress:
image: duo:wordpress-${WORDPRESS_VERSION:-latest}
Expand Down Expand Up @@ -27,4 +27,4 @@ services:
MYSQL_DATABASE: exampledb
MYSQL_USER: exampleuser
MYSQL_PASSWORD: examplepass
MYSQL_RANDOM_ROOT_PASSWORD: '1'
MYSQL_RANDOM_ROOT_PASSWORD: "1"
1 change: 1 addition & 0 deletions duo-universal
2 changes: 2 additions & 0 deletions package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
zip -r duo-universal.zip duo-universal/LICENSE duo-universal/README.md duo-universal/composer.json duo-universal/composer.lock duo-universal/*php duo-universal/vendor duo-universal/readme.txt

0 comments on commit 7630bb6

Please sign in to comment.