From 3cf995a5d9bb1191da2631abb65f1fe650dfb002 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 5 May 2021 11:38:47 -0500 Subject: [PATCH 1/6] add Linting action --- .github/workflows/lint.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..48f62fa --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +name: Linting + +on: + push: + branches: + - develop + - master + pull_request: + branches: + - develop + - master #can remove this if/when `develop` set as default branch + +jobs: + phpcs: + name: PHPCS + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set PHP version + uses: shivammathur/setup-php@v2 + with: + php-version: '7.2' + coverage: none + tools: composer:v1 + - name: composer install + run: composer install + - name: PHPCS check + uses: chekalsky/phpcs-action@v1 + with: + phpcs_bin_path: './vendor/bin/phpcs .' \ No newline at end of file From 194561f4077e070579cdd1a07c832da6c86c6e51 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 5 May 2021 11:53:25 -0500 Subject: [PATCH 2/6] add WP.org deploy action --- .github/workflows/dotorg-push-deploy.yml | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/dotorg-push-deploy.yml diff --git a/.github/workflows/dotorg-push-deploy.yml b/.github/workflows/dotorg-push-deploy.yml new file mode 100644 index 0000000..6e28798 --- /dev/null +++ b/.github/workflows/dotorg-push-deploy.yml @@ -0,0 +1,41 @@ +name: Deploy to WordPress.org + +on: + release: + types: [published] + +jobs: + tag: + name: New release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set Node.js 12 + uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: composer install + run: composer install --no-dev + - name: Build + run: | + npm install + npm run build + - name: WordPress Plugin Deploy + id: deploy + uses: 10up/action-wordpress-plugin-deploy@stable + with: + generate-zip: true + env: + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SLUG: php-compatibility-checker + - name: Upload release asset + uses: actions/upload-release-asset@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{github.workspace}}/php-compatibility-checker.zip + asset_name: php-compatibility-checker.zip + asset_content_type: application/zip \ No newline at end of file From 0ad1959d409599974c9b812e0ced0804fe314127 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 5 May 2021 11:53:58 -0500 Subject: [PATCH 3/6] update .distignore ordering, add github directory to ignore --- .distignore | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.distignore b/.distignore index f8e00c8..6794c02 100644 --- a/.distignore +++ b/.distignore @@ -1,23 +1,27 @@ +# Directories +/.circleci +/.git +/.github +/assets +- bin +/helpers + php52/vendor/bin +/tests + vendor/bin -- bin -.circleci + +# Files .distignore -.git .gitignore .phplint.yml -Dockerfile -Gruntfile.js -Makefile build.sh composer.json composer.lock docker-compose.yml -helpers +Dockerfile +Gruntfile.js +Makefile package-lock.json package.json php-lint.sh phpunit.xml.dist -readme.md -tests -assets \ No newline at end of file +readme.md \ No newline at end of file From c0f708abc987ef686e1fdfd9b2e112e04eb5d7eb Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 5 May 2021 11:56:11 -0500 Subject: [PATCH 4/6] add WP.org readme asset update action --- .../workflows/dotorg-asset-readme-update.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/dotorg-asset-readme-update.yml diff --git a/.github/workflows/dotorg-asset-readme-update.yml b/.github/workflows/dotorg-asset-readme-update.yml new file mode 100644 index 0000000..d334943 --- /dev/null +++ b/.github/workflows/dotorg-asset-readme-update.yml @@ -0,0 +1,19 @@ +name: Plugin asset/readme update + +on: + push: + branches: + - master + +jobs: + trunk: + name: Push to master + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: WordPress.org plugin asset/readme update + uses: 10up/action-wordpress-plugin-asset-update@stable + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SLUG: php-compatibility-checker \ No newline at end of file From b5aa18fa4b75cc1a628df508f13de19f702e9474 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 20 Jul 2022 11:52:13 -0500 Subject: [PATCH 5/6] Delete dotorg-asset-readme-update.yml --- .../workflows/dotorg-asset-readme-update.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .github/workflows/dotorg-asset-readme-update.yml diff --git a/.github/workflows/dotorg-asset-readme-update.yml b/.github/workflows/dotorg-asset-readme-update.yml deleted file mode 100644 index d334943..0000000 --- a/.github/workflows/dotorg-asset-readme-update.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Plugin asset/readme update - -on: - push: - branches: - - master - -jobs: - trunk: - name: Push to master - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: WordPress.org plugin asset/readme update - uses: 10up/action-wordpress-plugin-asset-update@stable - env: - SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} - SVN_USERNAME: ${{ secrets.SVN_USERNAME }} - SLUG: php-compatibility-checker \ No newline at end of file From f6c945d7317fab27ef728d85aa3733e965f4dd0f Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 20 Jul 2022 11:52:20 -0500 Subject: [PATCH 6/6] Delete dotorg-push-deploy.yml --- .github/workflows/dotorg-push-deploy.yml | 41 ------------------------ 1 file changed, 41 deletions(-) delete mode 100644 .github/workflows/dotorg-push-deploy.yml diff --git a/.github/workflows/dotorg-push-deploy.yml b/.github/workflows/dotorg-push-deploy.yml deleted file mode 100644 index 6e28798..0000000 --- a/.github/workflows/dotorg-push-deploy.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Deploy to WordPress.org - -on: - release: - types: [published] - -jobs: - tag: - name: New release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Set Node.js 12 - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - name: composer install - run: composer install --no-dev - - name: Build - run: | - npm install - npm run build - - name: WordPress Plugin Deploy - id: deploy - uses: 10up/action-wordpress-plugin-deploy@stable - with: - generate-zip: true - env: - SVN_USERNAME: ${{ secrets.SVN_USERNAME }} - SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} - SLUG: php-compatibility-checker - - name: Upload release asset - uses: actions/upload-release-asset@main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ${{github.workspace}}/php-compatibility-checker.zip - asset_name: php-compatibility-checker.zip - asset_content_type: application/zip \ No newline at end of file