Install Wordpress standards for linter #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Package and Upload Plugin | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install PHP_CodeSniffer + WordPress Standards | |
| run: | | |
| composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true | |
| composer global require --dev wp-coding-standards/wpcs:"^3.0" | |
| composer global require squizlabs/php_codesniffer | |
| ~/.composer/vendor/bin/phpcs --config-set installed_paths ~/.composer/vendor/wp-coding-standards/wpcs | |
| ~/.composer/vendor/bin/phpcs -i | |
| - name: Run PHP_CodeSniffer | |
| run: ~/.composer/vendor/bin/phpcs proxy-aware-https-fix.php --standard=WordPress --report=full | |
| - name: Zip plugin | |
| run: zip -r proxy-aware-https-fix.zip proxy-aware-https-fix.php README.md LICENSE CHANGELOG.md | |
| - name: Upload to GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: proxy-aware-https-fix.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |