{"id":16026883,"url":"https://github.com/leogopal/action-wp-plugin-deploy","last_synced_at":"2025-03-24T09:21:38.007Z","repository":{"id":68584152,"uuid":"356519856","full_name":"leogopal/action-wp-plugin-deploy","owner":"leogopal","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-10T11:45:43.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T01:03:01.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leogopal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-10T08:28:10.000Z","updated_at":"2025-02-24T10:02:05.000Z","dependencies_parsed_at":"2023-02-21T04:16:28.611Z","dependency_job_id":null,"html_url":"https://github.com/leogopal/action-wp-plugin-deploy","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"3c24049d00df85edaaefd4430356833590f5342b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leogopal%2Faction-wp-plugin-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leogopal%2Faction-wp-plugin-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leogopal%2Faction-wp-plugin-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leogopal%2Faction-wp-plugin-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leogopal","download_url":"https://codeload.github.com/leogopal/action-wp-plugin-deploy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245240829,"owners_count":20583102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T20:03:36.045Z","updated_at":"2025-03-24T09:21:37.966Z","avatar_url":"https://github.com/leogopal.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress.org Plugin Deploy\n\nThis Action commits the contents of your Git tag to the WordPress.org plugin repository using the same tag name. It can exclude files as defined in either `.distignore` or `.gitattributes`, and moves anything from a `.wordpress-org` subdirectory to the top-level `assets` directory in Subversion (plugin banners, icons, and screenshots).\n\n### ☞ For updating the readme and items in the assets directory between releases, please see our [WordPress.org Plugin Readme/Assets Update Action](https://github.com/10up/action-wordpress-plugin-asset-update)\n\n## Configuration\n\n### Required secrets\n* `SVN_USERNAME`\n* `SVN_PASSWORD`\n\n[Secrets are set in your repository settings](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets). They cannot be viewed once stored.\n\n### Optional environment variables\n* `SLUG` - defaults to the repository name, customizable in case your WordPress repository has a different slug or is capitalized differently.\n* `VERSION` - defaults to the tag name; do not recommend setting this except for testing purposes.\n* `ASSETS_DIR` - defaults to `.wordpress-org`, customizable for other locations of WordPress.org plugin repository-specific assets that belong in the top-level `assets` directory (the one on the same level as `trunk`).\n\n## Excluding files from deployment\nIf there are files or directories to be excluded from deployment, such as tests or editor config files, they can be specified in either a `.distignore` file or a `.gitattributes` file using the `export-ignore` directive. If a `.distignore` file is present, it will be used; if not, the Action will look for a `.gitattributes` file and barring that, will write a basic temporary `.gitattributes` into place before proceeding so that no Git/GitHub-specific files are included.\n\n`.distignore` is useful particularly when there are built files that are in `.gitignore`, and is a file that is used in [WP-CLI](https://wp-cli.org/). For modern plugin setups with a build step and no built files committed to the repository, this is the way forward. `.gitattributes` is useful for plugins that don't run a build step as a part of the Actions workflow and also allows for GitHub's generated ZIP files to contain the same contents as what is committed to WordPress.org. If you would like to attach a ZIP file with the proper contents that decompresses to a folder name without version number as WordPress generally expects, you can add steps to your workflow that generate the ZIP and attach it to the GitHub release (concrete examples to come).\n\n### Sample baseline files\n\n#### `.distignore`\n\n**Notes:** `.distignore` is for files to be ignored **only**; it does not currently allow negation like `.gitignore`. This comes from its current expected syntax in WP-CLI's [`wp dist-archive` command](https://github.com/wp-cli/dist-archive-command/). It is possible that this Action will allow for includes via something like a `.distinclude` file in the future, or that WP-CLI itself makes a change that this Action will reflect for consistency. It also will need to contain more than `.gitattributes` because that method **also** respects `.gitignore`.\n\n```\n/.wordpress-org\n/.git\n/.github\n/node_modules\n\n.distignore\n.gitignore\n```\n\n#### `.gitattributes`\n\n```gitattributes\n# Directories\n/.wordpress-org export-ignore\n/.github export-ignore\n\n# Files\n/.gitattributes export-ignore\n/.gitignore export-ignore\n```\n\n\n## Example Workflow Files\n\nTo get started, you will want to copy the contents of one of these examples into `.github/workflows/deploy.yml` and push that to your repository. You are welcome to name the file something else.\n\n### Deploy on pushing a new tag\n\n```yml\nname: Deploy to WordPress.org\non:\n  push:\n    tags:\n    - \"*\"\njobs:\n  tag:\n    name: New tag\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@master\n    - name: Build # Remove or modify this step as needed\n      run: |\n        npm install\n        npm run build\n    - name: WordPress Plugin Deploy\n      uses: leogopal/action-wp-plugin-deploy@main\n      env:\n        SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}\n        SVN_USERNAME: ${{ secrets.SVN_USERNAME }}\n        SLUG: my-super-cool-plugin # optional, remove if GitHub repo name matches SVN slug, including capitalization\n```\n\n### Deploy on publishing a new release and attach a ZIP file to the release\n```yml\nname: Deploy to WordPress.org\non:\n  release:\n    types: [published]\njobs:\n  tag:\n    name: New release\n    runs-on: ubuntu-latest\n    steps:\n    - name: Checkout code\n      uses: actions/checkout@v2\n    - name: Build\n      run: |\n        npm install\n        npm run build\n    - name: WordPress Plugin Deploy\n      id: deploy\n      uses: 10up/action-wordpress-plugin-deploy@stable\n      with:\n        generate-zip: true\n      env:\n        SVN_USERNAME: ${{ secrets.SVN_USERNAME }}\n        SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}\n    - name: Upload release asset\n      uses: actions/upload-release-asset@v1\n      env:\n        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      with:\n        upload_url: ${{ github.event.release.upload_url }}\n        asset_path: ${{github.workspace}}/${{ github.event.repository.name }}.zip\n        asset_name: ${{ github.event.repository.name }}.zip\n        asset_content_type: application/zip\n```\n\n## Contributing\nWant to help? Check out our [contributing guidelines](CONTRIBUTING.md) to get started.\n\n## License\n\nOur GitHub Actions are available for use and remix under the MIT license.\n\n### ☞ Check out our [collection of WordPress-focused GitHub Actions](https://github.com/10up/actions-wordpress)\n\n## Like what you see?\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"http://10up.com/contact/\"\u003e\u003cimg src=\"https://10up.com/uploads/2016/10/10up-Github-Banner.png\" width=\"850\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleogopal%2Faction-wp-plugin-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleogopal%2Faction-wp-plugin-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleogopal%2Faction-wp-plugin-deploy/lists"}