diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..c0ef5e5 --- /dev/null +++ b/.distignore @@ -0,0 +1,23 @@ +/.wordpress-org +/.git +/.github +/node_modules +/vendor + +.distignore +.gitignore +.jscsrc +.jshintrc +.travis.yml +travis.sh +composer.json +composer.lock +package.json +package-lock.json +phpcs.sh +phpcs.xml +phpmd +phpunit.xml +readme.md +CONTRIBUTING.md +CHANGELOG.md diff --git a/.github/scripts/generate-readme.js b/.github/scripts/generate-readme.js index d8e0dc8..bdc20c7 100755 --- a/.github/scripts/generate-readme.js +++ b/.github/scripts/generate-readme.js @@ -3,7 +3,7 @@ const path = require('path'); const readmePath = path.join(__dirname, '../../readme.md'); const changelogPath = path.join(__dirname, '../../CHANGELOG.md'); -const outputPath = path.join(__dirname, '../temp/readme.txt'); +const outputPath = path.join(__dirname, '../../readme.txt'); // Function to detect and remove badge lines function shouldRemoveLine(line) { diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c0d3236..00b309f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,46 +10,22 @@ jobs: runs-on: ubuntu-latest steps: - # Step 1: Checkout the repository - - name: Checkout Repository - uses: actions/checkout@v2 - - # Step 2: Set up Node.js (use the latest stable version) + - name: Checkout code + uses: actions/checkout@master + # Step 1: Set up Node.js (use the latest stable version) - name: Set up Node.js uses: actions/setup-node@v2 with: node-version: 'lts/*' # Use latest LTS version of Node.js - # Step 3: Install Node.js dependencies (if you have any, can be skipped if not needed) - # - name: Install dependencies - # run: npm install - - # Step 4: Generate readme.txt using the Node.js script in .github/scripts/ + # Step 2: Generate readme.txt using the Node.js script in .github/scripts/ - name: Generate readme.txt run: node .github/scripts/generate-readme.js - # Step 5: Install Subversion - - name: Install Subversion - run: sudo apt-get install subversion - - # Step 6: Deploy to WordPress SVN /trunk/ - - name: Deploy to WordPress SVN /trunk/ - env: - SVN_USERNAME: ${{ secrets.WORDPRESS_USERNAME }} - SVN_PASSWORD: ${{ secrets.WORDPRESS_PASSWORD }} - run: | - svn co https://plugins.svn.wordpress.org/discontinued-products/ svn-dir - rsync -av --delete --exclude=".git" ./ svn-dir/trunk/ - cp .github/temp/readme.txt svn-dir/trunk/readme.txt # Copy the newly generated readme.txt - cd svn-dir - svn add --force trunk/* - svn commit -m "Deploying version ${{ github.ref }}" --username $SVN_USERNAME --password $SVN_PASSWORD --non-interactive - - # Step 7: Create a tag in WordPress SVN /tags/ - - name: Create SVN Tag + # Step 3: WordPress Plugin Deploy + - name: WordPress Plugin Deploy + uses: 10up/action-wordpress-plugin-deploy@stable env: - SVN_USERNAME: ${{ secrets.WORDPRESS_USERNAME }} - SVN_PASSWORD: ${{ secrets.WORDPRESS_PASSWORD }} - run: | - VERSION=${GITHUB_REF/refs\/tags\/v/} - svn cp https://plugins.svn.wordpress.org/discontinued-products/trunk https://plugins.svn.wordpress.org/discontinued-products/tags/$VERSION -m "Tagging version $VERSION" --username $SVN_USERNAME --password $SVN_PASSWORD --non-interactive + SVN_PASSWORD: ${{ secrets.WORDPRESS_USERNAME }} + SVN_USERNAME: ${{ secrets.WORDPRESS_PASSWORD }} + SLUG: discontinued-products diff --git a/.gitignore b/.gitignore index c6e87ae..c8ce876 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,7 @@ yarn-error.log* /public/ ### Ignore the temp readme.txt file ### -/.github/temp/readme.txt +readme.txt ### PHP Composer (if added in the future) ### /vendor/ diff --git a/.wordpress-org/banner-1880x609.png b/.wordpress-org/banner-1880x609.png new file mode 100644 index 0000000..dc06e25 Binary files /dev/null and b/.wordpress-org/banner-1880x609.png differ diff --git a/.wordpress-org/banner-772x250.png b/.wordpress-org/banner-772x250.png new file mode 100644 index 0000000..c1a4550 Binary files /dev/null and b/.wordpress-org/banner-772x250.png differ diff --git a/.wordpress-org/icon-128x128.png b/.wordpress-org/icon-128x128.png new file mode 100644 index 0000000..36cf421 Binary files /dev/null and b/.wordpress-org/icon-128x128.png differ diff --git a/.wordpress-org/icon-256x256.png b/.wordpress-org/icon-256x256.png new file mode 100644 index 0000000..1227240 Binary files /dev/null and b/.wordpress-org/icon-256x256.png differ