diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..fcdcc23 --- /dev/null +++ b/.distignore @@ -0,0 +1,23 @@ +.wordpress-org +.git +.github +.circleci +node_modules +scripts +css/src +js/src +.gitattributes +.gitignore +Gulpfile.js +Gruntfile.js +package.json +package-lock.json +phpcs.xml +README.md +.gitattributes +.distignore +.DS_Store +composer.json +composer.lock +output.log +docker_tag diff --git a/.gitattributes b/.gitattributes index dfe0770..37a3d1f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,29 @@ # Auto detect text files and perform LF normalization * text=auto + +# Directories +/.wordpress-org export-ignore +/.git export-ignore +/.github export-ignore +/.circleci export-ignore +/node_modules export-ignore +/scripts export-ignore +/css/src export-ignore +/js/src export-ignore + +# Files +/.gitattributes export-ignore +/.gitignore export-ignore +/.distignore export-ignore +/Gulpfile.js export-ignore +/Gruntfile.js export-ignore +/package.json export-ignore +/package-lock.json export-ignore +/phpcs.xml export-ignore +/README.md export-ignore +/.gitattributes export-ignore +/.DS_Store export-ignore +/composer.json export-ignore +/composer.lock export-ignore +/output.log export-ignore +/docker_tag export-ignore diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e609a68 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,44 @@ +name: Deploy to WordPress.org +on: + release: + types: [published] +jobs: + tag: + name: New release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + uses: php-actions/composer@v5 + with: + dev: no + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- + - name: Build + run: | + npm install + - 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 }} + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{github.workspace}}/${{ github.event.repository.name }}.zip + asset_name: ${{ github.event.repository.name }}.zip + asset_content_type: application/zip