├── .github ├── CODEOWNERS ├── workflows │ ├── test.yml │ ├── release-pull-request.yml │ └── close-stale-issues.yml ├── ISSUE_TEMPLATE │ ├── 3-help.md │ ├── 1-bug-report.md │ └── 2-enhancement.md └── release-pull-request-template.md ├── examples ├── deploy-on-pushing-a-new-tag.yml ├── deploy-on-pushing-a-new-tag-and-create-release-with-attached-zip.yml └── deploy-on-publishing-a-new-release-and-attach-a-zip-file-to-the-release.yml ├── action.yml ├── LICENSE ├── CONTRIBUTING.md ├── CREDITS.md ├── README.md ├── deploy.sh └── CHANGELOG.md /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These owners will be the default owners for everything in the repo. Unless a later match takes precedence, @10up/open-source-practice, as primary maintainers will be requested for review when someone opens a Pull Request. 2 | * @10up/open-source-practice 3 | 4 | # GitHub specifics 5 | /.github/ @jeffpaul 6 | LICENSE @jeffpaul 7 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Automated Tests 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - develop 7 | push: 8 | branches: 9 | - develop 10 | jobs: 11 | shellcheck: 12 | name: Shellcheck 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@master 18 | - name: Shellcheck 19 | uses: ludeeus/action-shellcheck@master 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/3-help.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "❓ Need help?" 3 | about: Ask us a question, we're here to help! 4 | title: '' 5 | labels: question 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | **Describe your question** 13 | 14 | -------------------------------------------------------------------------------- /examples/deploy-on-pushing-a-new-tag.yml: -------------------------------------------------------------------------------- 1 | name: Deploy to WordPress.org 2 | on: 3 | push: 4 | tags: 5 | - "*" 6 | jobs: 7 | tag: 8 | name: New tag 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@master 12 | - name: Build # Remove or modify this step as needed 13 | run: | 14 | npm install 15 | npm run build 16 | - name: WordPress Plugin Deploy 17 | uses: 10up/action-wordpress-plugin-deploy@stable 18 | env: 19 | SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} 20 | SVN_USERNAME: ${{ secrets.SVN_USERNAME }} 21 | SLUG: my-super-cool-plugin # optional, remove if GitHub repo name matches SVN slug, including capitalization 22 | 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/1-bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F41B Bug report" 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | **Describe the bug** 13 | 14 | 15 | **Steps to Reproduce** 16 | 17 | 1. Go to '...' 18 | 2. Click on '....' 19 | 3. Scroll down to '....' 20 | 4. See error 21 | 22 | **Expected behavior** 23 | 24 | 25 | **Additional context** 26 | 27 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'WordPress Plugin Deploy' 2 | description: 'Deploy to the WordPress Plugin Repository' 3 | author: '10up' 4 | branding: 5 | icon: 'upload-cloud' 6 | color: 'blue' 7 | inputs: 8 | generate-zip: 9 | description: 'Generate package zip file?' 10 | default: false 11 | dry-run: 12 | description: 'Run the deployment process without committing.' 13 | default: false 14 | outputs: 15 | zip-path: 16 | description: 'Path to zip file' 17 | value: ${{ steps.deploy.outputs.zip-path }} 18 | runs: 19 | using: 'composite' 20 | steps: 21 | - id: deploy 22 | env: 23 | INPUT_GENERATE_ZIP: ${{ inputs.generate-zip }} 24 | INPUT_DRY_RUN: ${{ inputs.dry-run }} 25 | run: ${{ github.action_path }}/deploy.sh 26 | shell: bash 27 | -------------------------------------------------------------------------------- /.github/workflows/release-pull-request.yml: -------------------------------------------------------------------------------- 1 | name: Release Pull Request Automation 2 | 3 | on: 4 | create: 5 | jobs: 6 | release-pull-request-automation: 7 | if: ${{ github.event.ref_type == 'branch' && contains( github.ref, 'release/' ) }} 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout code 11 | uses: actions/checkout@v3 12 | - name: Generate title 13 | run: | 14 | BRANCH=${GITHUB_REF##*/} 15 | echo $BRANCH 16 | VERSION=${BRANCH#'release/'} 17 | echo "result=Release: ${VERSION}" >> "${GITHUB_OUTPUT}" 18 | id: title 19 | - name: Create Pull Request 20 | run: gh pr create --title "${{ steps.title.outputs.result }}" --body-file ./.github/release-pull-request-template.md 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/2-enhancement.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F680 Enhancement" 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | **Is your enhancement related to a problem? Please describe.** 13 | 14 | 15 | **Describe the solution you'd like** 16 | 17 | 18 | **Designs** 19 | 20 | 21 | **Describe alternatives you've considered** 22 | 23 | 24 | **Additional context** 25 | 26 | -------------------------------------------------------------------------------- /examples/deploy-on-pushing-a-new-tag-and-create-release-with-attached-zip.yml: -------------------------------------------------------------------------------- 1 | name: Deploy and Release Plugin 2 | on: 3 | push: 4 | tags: 5 | - "*" 6 | jobs: 7 | tag: 8 | name: New tag 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout code 12 | uses: actions/checkout@v2 13 | - name: Build 14 | run: | 15 | npm install 16 | npm run build 17 | - name: WordPress Plugin Deploy 18 | id: deploy 19 | uses: 10up/action-wordpress-plugin-deploy@stable 20 | with: 21 | generate-zip: true 22 | env: 23 | SVN_USERNAME: ${{ secrets.SVN_USERNAME }} 24 | SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} 25 | - name: Create GitHub release 26 | uses: softprops/action-gh-release@v1 27 | with: 28 | files: ${{github.workspace}}/${{ github.event.repository.name }}.zip 29 | env: 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Helen Hou-Sandi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/release-pull-request-template.md: -------------------------------------------------------------------------------- 1 | - [x] Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes. 2 | - [ ] Changelog: Add/update the changelog in `CHANGELOG.md`. 3 | - [ ] Props: update `CREDITS.md` file with any new contributors, confirm maintainers are accurate. 4 | - [ ] Readme updates: Make any other readme changes as necessary in `README.md`. 5 | - [ ] Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then merge `develop` into `stable` (`git checkout stable && git merge --no-ff develop`). 6 | - [ ] Push: Push your stable branch to GitHub (e.g. `git push origin stable`). 7 | - [ ] Release: Create a [new release](https://github.com/10up/action-wordpress-plugin-deploy/releases/new), naming the tag and the release with the new version number, and targeting the `stable` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the [milestone](https://github.com/10up/action-wordpress-plugin-deploy/milestones/#?closed=1). The release should now appear under [releases](https://github.com/10up/action-wordpress-plugin-deploy/releases). 8 | - [ ] Ensure the release [appears in the GitHub Marketplace](https://github.com/marketplace/actions/wordpress-plugin-deploy) correctly. 9 | - [ ] Close milestone: Edit the [milestone](https://github.com/10up/action-wordpress-plugin-deploy/milestones/) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description field`), then close the milestone. 10 | - [ ] Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`. 11 | - [ ] Celebrate shipping! -------------------------------------------------------------------------------- /.github/workflows/close-stale-issues.yml: -------------------------------------------------------------------------------- 1 | name: 'Close stale issues' 2 | 3 | # **What it does**: Closes issues where the original author doesn't respond to a request for information. 4 | # **Why we have it**: To remove the need for maintainers to remember to check back on issues periodically to see if contributors have responded. 5 | 6 | on: 7 | schedule: 8 | # Schedule for every day at 1:30am UTC 9 | - cron: '30 1 * * *' 10 | 11 | permissions: 12 | issues: write 13 | 14 | jobs: 15 | stale: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/stale@v9 19 | with: 20 | days-before-stale: 7 21 | days-before-close: 7 22 | stale-issue-message: > 23 | It has been 7 days since more information was requested from you in this issue and we have not heard back. This issue is now marked as stale and will be closed in 7 days, but if you have more information to add then please comment and the issue will stay open. 24 | close-issue-message: > 25 | This issue has been automatically closed because there has been no response 26 | to our request for more information. With only the 27 | information that is currently in the issue, we don't have enough information 28 | to take action. Please reach out if you have or find the answers we need so 29 | that we can investigate further. See [this blog post on bug reports and the 30 | importance of repro steps](https://www.lee-dohm.com/2015/01/04/writing-good-bug-reports/) 31 | for more information about the kind of information that may be helpful. 32 | stale-issue-label: 'stale' 33 | close-issue-reason: 'not_planned' 34 | any-of-labels: 'needs:feedback' 35 | remove-stale-when-updated: true 36 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing and Maintaining 2 | 3 | First, thank you for taking the time to contribute! 4 | 5 | The following is a set of guidelines for contributors as well as information and instructions around our maintenance process. The two are closely tied together in terms of how we all work together and set expectations, so while you may not need to know everything in here to submit an issue or pull request, it's best to keep them in the same document. 6 | 7 | ## Ways to contribute 8 | 9 | Contributing isn't just writing code - it's anything that improves the project. All contributions for our GitHub Actions for WordPress are managed right here on GitHub. Here are some ways you can help: 10 | 11 | ### Reporting bugs 12 | 13 | If you're running into an issue with the action, please take a look through [existing issues](https://github.com/10up/action-wordpress-plugin-deploy/issues) and [open a new one](https://github.com/10up/action-wordpress-plugin-deploy/issues/new) if needed. If you're able, include a link to the log output from the failed run. 14 | 15 | ### Suggesting enhancements 16 | 17 | New features and enhancements are also managed via [issues](https://github.com/10up/action-wordpress-plugin-deploy/issues). 18 | 19 | ### Pull requests 20 | 21 | Pull requests represent a proposed solution to a specified problem. They should always reference an issue that describes the problem and contains discussion about the problem itself. Discussion on pull requests should be limited to the pull request itself, i.e. code review. 22 | 23 | For more on how 10up writes and manages code, check out our [10up Engineering Best Practices](https://10up.github.io/Engineering-Best-Practices/). 24 | 25 | ## Workflow 26 | 27 | This repository currently uses the `develop` branch to reflect active work and `stable` to represent the latest tagged release. Both should typically be usable and frequently the same, but we request that pull requests be opened against `develop` and usage of the action be against `stable` or a specific tag. New releases will be tagged as updates are made. 28 | 29 | ## Release instructions 30 | 31 | A new release pull requestwill be created automatically once a branch named `release/X.Y.Z` is pushed to GitHub. 32 | 33 | The step by step release instructions can be found in [.github/release-pull-request-template.md](.github/release-pull-request-template.md). -------------------------------------------------------------------------------- /examples/deploy-on-publishing-a-new-release-and-attach-a-zip-file-to-the-release.yml: -------------------------------------------------------------------------------- 1 | # The name of the Github Action that displays in github.com///actions 2 | name: Deploy to WordPress.org Repository 3 | 4 | # Here we can define the events "on" which the action should be triggered. 5 | on: 6 | 7 | # Since we want to publish new versions of our plugin, we only want this action to 8 | # run when publishing a new release. 9 | # 10 | # The released version of the plugin will then be deployed to the repository. 11 | # 12 | # This allows us to run and manage plugin releases from a single location. 13 | release: 14 | 15 | # run only when a new release is published, but not when it's classified as a pre-release. 16 | types: [released] 17 | 18 | # A list of jobs involved in this workflow. 19 | jobs: 20 | 21 | # A unique job identifier. 22 | # 23 | # Github Actions can have multiple jobs and each can be referenced by its name. 24 | # However, we only need to run a few steps here and they can be handled in a single job. 25 | deploy_to_wp_repository: 26 | 27 | # The proper name for the job being run. 28 | name: Deploy to WP.org 29 | 30 | # The environment this job should run on. In the context of WordPress, ubuntu-latest is 31 | # pretty typical. Since we are only interacting with git and subversion, Ubuntu is perfect 32 | # for this. 33 | # 34 | # Github does offer other platforms if you need them: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on 35 | runs-on: ubuntu-latest 36 | 37 | # Every job has a specific set of steps that it goes through to do its "work". 38 | # 39 | # Each step has a two key elements: 40 | # • Name 41 | # • a "run" command (an arbitrary CLI command to execute) OR a "uses" command that pulls in and executes a 3rd party action. 42 | steps: 43 | 44 | # Most workflows begin by checking out the repository into the workflow filesystem. 45 | # 46 | # This is just like cloning a repository except it only checks out the specific commit 47 | # the job is executed for. In our case here, the commit that the release is attached to. 48 | - name: Checkout code 49 | uses: actions/checkout@v2 50 | 51 | # Optional: If your plugin is using composer dependencies, we want to include them 52 | # WITHOUT the dev dependencies. 53 | - name: Build 54 | run: | 55 | npm install 56 | npm run build 57 | 58 | - name: WordPress Plugin Deploy 59 | 60 | # You can add unique ids to specific steps if you want to reference their output later in the workflow. 61 | # 62 | # Here, this unique identifier lets us use the output from the action to get the zip-path later. 63 | id: deploy 64 | 65 | # The use statement lets us pull in the work done by 10up to deploy the plugin to the WordPress repository. 66 | uses: 10up/action-wordpress-plugin-deploy@stable 67 | 68 | # Steps can also provide arguments, so this configures 10up's action to also generate a zip file. 69 | with: 70 | generate-zip: true 71 | 72 | # Steps can also set environment variables which can be configured in the Github settings for the 73 | # repository. Here, we are using action secrets SVN_USERNAME, SVN_PASSWORD, and PLUGIN_SLUG which 74 | # authenticate with WordPress and lets the action deploy our plugin to the repository. 75 | # 76 | # To learn more about setting and using secrets with Github Actions, check out: https://docs.github.com/en/actions/security-guides/encrypted-secrets?tool=webui#about-encrypted-secrets 77 | env: 78 | SVN_USERNAME: ${{ secrets.SVN_USERNAME }} 79 | SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} 80 | 81 | # After the deploy, we also want to create a zip and upload it to the release on Github. We don't want 82 | # users to have to go to the repository to find our plugin :). 83 | - name: Upload release asset 84 | uses: softprops/action-gh-release@v2 85 | env: 86 | # Note, this is an exception to action secrets: GH_TOKEN is always available and provides access to 87 | # the current repository this action runs in. 88 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 89 | 90 | with: 91 | # Provide what the file should be named when attached to the release (plugin-name.zip) 92 | files: ${{ github.workspace }}/${{ github.event.repository.name }}.zip 93 | -------------------------------------------------------------------------------- /CREDITS.md: -------------------------------------------------------------------------------- 1 | The following acknowledges the Maintainers for this repository, those who have Contributed to this repository (via bug reports, code, design, ideas, project management, translation, testing, etc.), and any Libraries utilized. 2 | 3 | ## Maintainers 4 | 5 | The following individuals are responsible for curating the list of issues, responding to pull requests, and ensuring regular releases happen. 6 | 7 | [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul). 8 | 9 | ## Contributors 10 | 11 | Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc. 12 | 13 | [Mark Jaquith (@markjaquith)](https://github.com/markjaquith), [Ciprian Popescu (@wolffe)](https://github.com/wolffe), [Léo Colombaro (@LeoColomb)](https://github.com/LeoColomb), [Helen Hou-Sandi (@helen)](https://github.com/helen), [Vincenzo Russo (@vincenzo)](https://github.com/vincenzo), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Nikhil (@Nikschavan)](https://github.com/Nikschavan), [Niels Lange (@nielslange)](https://github.com/nielslange), [Stiofan O'Connor (@Stiofan)](https://github.com/Stiofan), [Sébastien SERRE (@sebastienserre)](https://github.com/sebastienserre), [Ram Ratan Maurya (@mauryaratan)](https://github.com/mauryaratan), [Johannes Siipola (@joppuyo)](https://github.com/joppuyo), [Felipe Elia (@felipeelia)](https://github.com/felipeelia), [Mobeen Abdullah (@mobeenabdullah)](https://github.com/mobeenabdullah), [Gaya Kessler (@Gaya)](https://github.com/Gaya), [Viktor Szépe (@szepeviktor)](https://github.com/szepeviktor), [Grégory Viguier (@Screenfeed)](https://github.com/Screenfeed), [Pascal Knecht (@pascalknecht)](https://github.com/pascalknecht), [Stanislav Khromov (@khromov)](https://github.com/khromov), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Jakub Mikita (@Kubitomakita)](https://github.com/Kubitomakita), [Lucas Bustamante (@Luc45)](https://github.com/Luc45), [Thien Nguyen (@tatthien-zz)](https://github.com/tatthien-zz), [Shiva Poudel (@shivapoudel)](https://github.com/shivapoudel), [null (@nextgenthemes)](https://github.com/nextgenthemes), [Tom Usborne (@tomusborne)](https://github.com/tomusborne), [dean shmuel (@deanshmuel)](https://github.com/deanshmuel), [Peter Adams (@padams)](https://github.com/padams), [Kevin Batdorf (@KevinBatdorf)](https://github.com/KevinBatdorf), [Q (@qstudio)](https://github.com/qstudio), [null (@om4csaba)](https://github.com/om4csaba), [Roman Sapezhko (@shmidtelson)](https://github.com/shmidtelson), [null (@luizkim)](https://github.com/luizkim), [René Hermenau (@rene-hermenau)](https://github.com/rene-hermenau), [Lewis Cowles (@Lewiscowles1986)](https://github.com/Lewiscowles1986), [Dominik Schilling (@ocean90)](https://github.com/ocean90), [Santiago Becerra (@sanbec)](https://github.com/sanbec), [Marijn Bent (@marijnbent)](https://github.com/marijnbent), [Jasan (@jasan-s)](https://github.com/jasan-s), [Dale Nguyen (@dalenguyen)](https://github.com/dalenguyen), [Darren Cooney (@dcooney)](https://github.com/dcooney), [Karolína Vyskočilová (@vyskoczilova)](https://github.com/vyskoczilova), [Rafał Sztwiorok (@sztwiorok)](https://github.com/sztwiorok), [Alec Rust (@AlecRust)](https://github.com/AlecRust), [Jonny Harris (@spacedmonkey)](https://github.com/spacedmonkey), [Doeke Norg (@doekenorg)](https://github.com/doekenorg), [Andrew Heberle (@andrewheberle)](https://github.com/andrewheberle), [Takashi Hosoya (@tkc49)](https://github.com/tkc49), [Fabian Marz (@fabianmarz)](https://github.com/fabianmarz), [David Herron (@robogeek)](https://github.com/robogeek), [Sergey Kotlov (@sery0ga)](https://github.com/sery0ga), [Samuel Wood (@Otto42)](https://github.com/Otto42), [IgorChernenko (@igorchernenko92)](https://github.com/igorchernenko92), [Richard Muvirimi (@richard-muvirimi)](https://github.com/richard-muvirimi), [Dani Llewellyn (@diddledani)](https://github.com/diddledani), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Mukesh Panchal (@mukeshpanchal27)](https://github.com/mukeshpanchal27), [Joe McGill (@joemcgill)](https://github.com/joemcgill), [Felix Arntz (@felixarntz)](https://github.com/felixarntz), [Evan Mattson (@aaemnnosttv)](https://github.com/aaemnnosttv), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Stephanie Wells (@stephywells)](https://github.com/stephywells), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Jason Adams (@JasonTheAdams)](https://github.com/JasonTheAdams), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Uriahs Victor (@UVLabs)](https://github.com/UVLabs), [Simon Dowdles (@10upsimon)](https://github.com/10upsimon), [Volodymyr Kolesnykov (@sjinks)](https://github.com/sjinks), [Max Lyuchin (@cadic)](https://github.com/cadic), [Rahul Prajapati (@rahulsprajapati)](https://github.com/rahulsprajapati), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Alex Kirk (@akirk)](https://github.com/akirk), [Lu Fei (@sy-records)](https://github.com/sy-records), [Tanner Record (@tarecord)](https://github.com/tarecord), [Frankie Bordone (@frankiebordone)](https://github.com/frankiebordone), [Thrijith Thankachan (@thrijith)](https://github.com/thrijith), [Pedro Mendonça (@pedro-mendonca)](https://github.com/pedro-mendonca), [Kirtan Gajjar (@kirtangajjar)](https://github.com/kirtangajjar), [Scott Adrian (@scott-sharethis)](https://github.com/scott-sharethis), [Peter Ambrus (@Surbma)](https://github.com/Surbma), [Ali Colville (@alicolville)](https://github.com/alicolville), [Adrian Tobey (@tobeyadr)](https://github.com/tobeyadr), [Takahashi Fumiki (@fumikito)](https://github.com/fumikito). 14 | 15 | ## Libraries 16 | 17 | The following software libraries are utilized in this repository. 18 | 19 | n/a. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WordPress.org Plugin Deploy 2 | 3 | > Deploy your plugin to the WordPress.org repository using GitHub Actions. 4 | 5 | [![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/action-wordpress-plugin-deploy.svg)](https://github.com/10up/action-wordpress-plugin-deploy/releases/latest) [![MIT License](https://img.shields.io/github/license/10up/action-wordpress-plugin-deploy.svg)](https://github.com/10up/action-wordpress-plugin-deploy/blob/develop/LICENSE) [![Automated Tests](https://github.com/10up/action-wordpress-plugin-deploy/actions/workflows/test.yml/badge.svg)](https://github.com/10up/action-wordpress-plugin-deploy/actions/workflows/test.yml) 6 | 7 | This 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). 8 | 9 | ### ☞ 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) 10 | 11 | ### ☞ Check out our [collection of WordPress-focused GitHub Actions](https://github.com/10up/actions-wordpress) 12 | 13 | ## Configuration 14 | 15 | ### Required secrets 16 | 17 | * `SVN_USERNAME` 18 | * `SVN_PASSWORD` 19 | 20 | [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. 21 | 22 | ### Optional environment variables 23 | 24 | * `SLUG` - Defaults to the repository name. This is customizable in case your WordPress repository has a different slug or is capitalized differently. 25 | * `VERSION` - Defaults to the tag name. We do not recommend setting this except for testing purposes. 26 | * `ASSETS_DIR` - Defaults to `.wordpress-org`. This is 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`). 27 | * `BUILD_DIR` - Defaults to `false`. Set this flag to the directory where you build your plugins files into, then the action will copy and deploy files from that directory. Both absolute and relative paths are supported. The relative path if provided will be concatenated with the repository root directory. All files and folders in the build directory will be deployed, `.distignore` or `.gitattributes` will be ignored. 28 | 29 | ### Inputs 30 | 31 | * `generate-zip` - Defaults to `false`. Generate a ZIP file from the SVN `trunk` directory. Outputs a `zip-path` variable for use in further workflow steps. 32 | * `dry-run` - Defaults to `false`. Set this to `true` if you want to skip the final Subversion commit step (e.g., to debug prior to a non-dry-run commit). `dry-run` - `true` Doesn't require SVN secret. 33 | 34 | ### Outputs 35 | 36 | * `zip-path` - The path to the ZIP file generated if `generate-zip` is set to `true`. Fully qualified including the filename, intended for use in further workflow steps such as uploading release assets. 37 | 38 | ## Excluding files from deployment 39 | 40 | If 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. 41 | 42 | `.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). 43 | 44 | ### Sample baseline files 45 | 46 | #### `.distignore` 47 | 48 | **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`. 49 | 50 | ``` 51 | /.wordpress-org 52 | /.git 53 | /.github 54 | /node_modules 55 | 56 | .distignore 57 | .gitignore 58 | ``` 59 | 60 | #### `.gitattributes` 61 | 62 | ```gitattributes 63 | # Directories 64 | /.wordpress-org export-ignore 65 | /.github export-ignore 66 | 67 | # Files 68 | /.gitattributes export-ignore 69 | /.gitignore export-ignore 70 | ``` 71 | 72 | ## Example Workflow Files 73 | 74 | To get started, you will want to copy the contents of one of [these examples](examples) into `.github/workflows/deploy.yml` and push that to your repository. You are welcome to name the file something else, but it must be in that directory. The usage of `ubuntu-latest` is recommended for compatibility with required dependencies in this Action. 75 | 76 | Current set of example workflow files: 77 | 78 | * [Deploy on publishing a new release and attach a ZIP file to the release](examples/deploy-on-publishing-a-new-release-and-attach-a-zip-file-to-the-release.yml) 79 | * [Deploy on pushing a new tag](examples/deploy-on-pushing-a-new-tag.yml) 80 | 81 | **Note**: The following step is required to check out the repository for use during the workflow run: 82 | ``` 83 | - uses: actions/checkout@v4 84 | ``` 85 | 86 | * [Deploy on pushing a new tag and create release with attached ZIP](examples/deploy-on-pushing-a-new-tag-and-create-release-with-attached-zip.yml) 87 | 88 | ## Contributing 89 | 90 | Want to help? Check out our [contributing guidelines](CONTRIBUTING.md) to get started. 91 | 92 | ## License 93 | 94 | Our GitHub Actions are available for use and remix under the MIT license. 95 | 96 | ## Support Level 97 | 98 | **Active:** 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome. 99 | 100 | ## Like what you see? 101 | 102 |

103 | 104 |

105 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Note that this does not use pipefail 4 | # because if the grep later doesn't match any deleted files, 5 | # which is likely to be the case the majority of the time, 6 | # it does not exit with 0, as we are interested in the final exit. 7 | set -eo 8 | 9 | # Function to check if a command exists 10 | command_exists() { 11 | command -v "$1" >/dev/null 2>&1 12 | } 13 | 14 | # Check if SVN is installed 15 | if command_exists svn; then 16 | echo "SVN is already installed." 17 | else 18 | echo "SVN is not installed. Installing SVN..." 19 | 20 | # Update the package list 21 | sudo apt-get update -y 22 | 23 | # Install SVN 24 | sudo apt-get install -y subversion 25 | 26 | # Verify installation 27 | if command_exists svn; then 28 | echo "SVN was successfully installed." 29 | else 30 | echo "Failed to install SVN. Please check your system configuration." 31 | exit 1 32 | fi 33 | fi 34 | 35 | # Ensure SVN username and password are set 36 | # IMPORTANT: while secrets are encrypted and not viewable in the GitHub UI, 37 | # they are by necessity provided as plaintext in the context of the Action, 38 | # so do not echo or use debug mode unless you want your secrets exposed! 39 | 40 | # Check if it's a dry-run first 41 | if $INPUT_DRY_RUN; then 42 | echo "ℹ︎ Dry run: No files will be committed to Subversion." 43 | 44 | if [[ -z "$SVN_USERNAME" ]]; then 45 | echo "Warning: SVN_USERNAME is missing. The commit will fail if you attempt a real run." 46 | fi 47 | 48 | if [[ -z "$SVN_PASSWORD" ]]; then 49 | echo "Warning: SVN_PASSWORD is missing. The commit will fail if you attempt a real run." 50 | fi 51 | else 52 | # If it's not a dry-run, check for SVN credentials 53 | if [[ -z "$SVN_USERNAME" ]]; then 54 | echo "Set the SVN_USERNAME secret" 55 | exit 1 56 | fi 57 | 58 | if [[ -z "$SVN_PASSWORD" ]]; then 59 | echo "Set the SVN_PASSWORD secret" 60 | exit 1 61 | fi 62 | fi 63 | 64 | # Allow some ENV variables to be customized 65 | if [[ -z "$SLUG" ]]; then 66 | SLUG=${GITHUB_REPOSITORY#*/} 67 | fi 68 | echo "ℹ︎ SLUG is $SLUG" 69 | 70 | # Allow setting custom version number in advanced workflows 71 | if [[ -z "$VERSION" ]]; then 72 | VERSION="${GITHUB_REF#refs/tags/}" 73 | VERSION="${VERSION#v}" 74 | fi 75 | echo "ℹ︎ VERSION is $VERSION" 76 | 77 | if [[ -z "$ASSETS_DIR" ]]; then 78 | ASSETS_DIR=".wordpress-org" 79 | fi 80 | echo "ℹ︎ ASSETS_DIR is $ASSETS_DIR" 81 | 82 | if [[ -z "$BUILD_DIR" ]] || [[ $BUILD_DIR == "./" ]]; then 83 | BUILD_DIR=false 84 | elif [[ $BUILD_DIR == ./* ]]; then 85 | BUILD_DIR=${BUILD_DIR:2} 86 | fi 87 | 88 | if [[ "$BUILD_DIR" != false ]]; then 89 | if [[ $BUILD_DIR != /* ]]; then 90 | BUILD_DIR="${GITHUB_WORKSPACE%/}/${BUILD_DIR%/}" 91 | fi 92 | echo "ℹ︎ BUILD_DIR is $BUILD_DIR" 93 | fi 94 | 95 | SVN_URL="https://plugins.svn.wordpress.org/${SLUG}/" 96 | SVN_DIR="${HOME}/svn-${SLUG}" 97 | 98 | # Checkout SVN repository. 99 | echo "➤ Checking out .org repository..." 100 | svn checkout --depth immediates "$SVN_URL" "$SVN_DIR" 101 | cd "$SVN_DIR" 102 | svn update --set-depth infinity assets 103 | svn update --set-depth infinity trunk 104 | svn update --set-depth immediates tags 105 | 106 | generate_zip() { 107 | if $INPUT_GENERATE_ZIP; then 108 | echo "Generating zip file..." 109 | 110 | # use a symbolic link so the directory in the zip matches the slug 111 | ln -s "${SVN_DIR}/trunk" "${SVN_DIR}/${SLUG}" 112 | zip -r "${GITHUB_WORKSPACE}/${SLUG}.zip" "$SLUG" 113 | unlink "${SVN_DIR}/${SLUG}" 114 | 115 | echo "zip-path=${GITHUB_WORKSPACE}/${SLUG}.zip" >> "${GITHUB_OUTPUT}" 116 | echo "✓ Zip file generated!" 117 | fi 118 | } 119 | 120 | # Bail early if the plugin version is already published. 121 | if [[ -d "tags/$VERSION" ]]; then 122 | echo "ℹ︎ Version $VERSION of plugin $SLUG was already published"; 123 | 124 | generate_zip 125 | 126 | exit 127 | fi 128 | 129 | if [[ "$BUILD_DIR" = false ]]; then 130 | echo "➤ Copying files..." 131 | if [[ -e "$GITHUB_WORKSPACE/.distignore" ]]; then 132 | echo "ℹ︎ Using .distignore" 133 | # Copy from current branch to /trunk, excluding dotorg assets 134 | # The --delete flag will delete anything in destination that no longer exists in source 135 | rsync -rc --exclude-from="$GITHUB_WORKSPACE/.distignore" "$GITHUB_WORKSPACE/" trunk/ --delete --delete-excluded 136 | else 137 | echo "ℹ︎ Using .gitattributes" 138 | 139 | cd "$GITHUB_WORKSPACE" 140 | 141 | # "Export" a cleaned copy to a temp directory 142 | TMP_DIR="${HOME}/archivetmp" 143 | mkdir "$TMP_DIR" 144 | 145 | # Workaround for: detected dubious ownership in repository at '/github/workspace' issue. 146 | # see: https://github.com/10up/action-wordpress-plugin-deploy/issues/116 147 | # Mark github workspace as safe directory. 148 | git config --global --add safe.directory "$GITHUB_WORKSPACE" 149 | 150 | git config --global user.email "10upbot+github@10up.com" 151 | git config --global user.name "10upbot on GitHub" 152 | 153 | # Ensure git archive will pick up any changed files in the directory try. 154 | test "$(git ls-files --deleted)" && git rm "$(git ls-files --deleted)" 155 | if [ -n "$(git status --porcelain --untracked-files=all)" ]; then 156 | git add . 157 | git commit -m "Include build step changes" 158 | fi 159 | 160 | # If there's no .gitattributes file, write a default one into place 161 | if [[ ! -e "$GITHUB_WORKSPACE/.gitattributes" ]]; then 162 | cat > "$GITHUB_WORKSPACE/.gitattributes" <<-EOL 163 | /$ASSETS_DIR export-ignore 164 | /.gitattributes export-ignore 165 | /.gitignore export-ignore 166 | /.github export-ignore 167 | EOL 168 | 169 | # Ensure we are in the $GITHUB_WORKSPACE directory, just in case 170 | # The .gitattributes file has to be committed to be used 171 | # Just don't push it to the origin repo :) 172 | git add .gitattributes && git commit -m "Add .gitattributes file" 173 | fi 174 | 175 | # This will exclude everything in the .gitattributes file with the export-ignore flag 176 | git archive HEAD | tar x --directory="$TMP_DIR" 177 | 178 | cd "$SVN_DIR" 179 | 180 | # Copy from clean copy to /trunk, excluding dotorg assets 181 | # The --delete flag will delete anything in destination that no longer exists in source 182 | rsync -rc "$TMP_DIR/" trunk/ --delete --delete-excluded 183 | fi 184 | else 185 | echo "ℹ︎ Copying files from build directory..." 186 | rsync -rc "$BUILD_DIR/" trunk/ --delete --delete-excluded 187 | fi 188 | 189 | # Copy dotorg assets to /assets 190 | if [[ -d "$GITHUB_WORKSPACE/$ASSETS_DIR/" ]]; then 191 | rsync -rc "$GITHUB_WORKSPACE/$ASSETS_DIR/" assets/ --delete 192 | else 193 | echo "ℹ︎ No assets directory found; skipping asset copy" 194 | fi 195 | 196 | # Add everything and commit to SVN 197 | # The force flag ensures we recurse into subdirectories even if they are already added 198 | # Suppress stdout in favor of svn status later for readability 199 | echo "➤ Preparing files..." 200 | svn add . --force > /dev/null 201 | 202 | # SVN delete all deleted files 203 | # Also suppress stdout here 204 | svn status | grep '^\!' | sed 's/! *//' | xargs -I% svn rm %@ > /dev/null 205 | 206 | # Copy tag locally to make this a single commit 207 | echo "➤ Copying tag..." 208 | svn cp "trunk" "tags/$VERSION" 209 | 210 | # Fix screenshots getting force downloaded when clicking them 211 | # https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/ 212 | if test -d "$SVN_DIR/assets" && test -n "$(find "$SVN_DIR/assets" -maxdepth 1 -name "*.png" -print -quit)"; then 213 | svn propset svn:mime-type "image/png" "$SVN_DIR/assets/"*.png || true 214 | fi 215 | if test -d "$SVN_DIR/assets" && test -n "$(find "$SVN_DIR/assets" -maxdepth 1 -name "*.jpg" -print -quit)"; then 216 | svn propset svn:mime-type "image/jpeg" "$SVN_DIR/assets/"*.jpg || true 217 | fi 218 | if test -d "$SVN_DIR/assets" && test -n "$(find "$SVN_DIR/assets" -maxdepth 1 -name "*.gif" -print -quit)"; then 219 | svn propset svn:mime-type "image/gif" "$SVN_DIR/assets/"*.gif || true 220 | fi 221 | if test -d "$SVN_DIR/assets" && test -n "$(find "$SVN_DIR/assets" -maxdepth 1 -name "*.svg" -print -quit)"; then 222 | svn propset svn:mime-type "image/svg+xml" "$SVN_DIR/assets/"*.svg || true 223 | fi 224 | 225 | #Resolves => SVN commit failed: Directory out of date 226 | svn update 227 | 228 | svn status 229 | 230 | if $INPUT_DRY_RUN; then 231 | echo "➤ Dry run: Files not committed." 232 | else 233 | echo "➤ Committing files..." 234 | svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" 235 | fi 236 | 237 | generate_zip 238 | 239 | echo "✓ Plugin deployed!" 240 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file, per [the Keep a Changelog standard](http://keepachangelog.com/). 4 | 5 | ## [Unreleased] - TBD 6 | 7 | ## [2.3.0] - 2025-01-21 8 | ### Added 9 | - Example workflow files to documentation (props [@jeffpaul](https://github.com/jeffpaul), [@AlecRust](https://github.com/AlecRust), [@helen](https://github.com/helen), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#143](https://github.com/10up/action-wordpress-plugin-deploy/pull/143)). 10 | - Add comments to the example workflow file to help better explain what each step does (props [@tarecord](https://github.com/tarecord), [@jeffpaul](https://github.com/jeffpaul) via [#144](https://github.com/10up/action-wordpress-plugin-deploy/pull/144)). 11 | - Documentation update in the `README` with required `actions/checkout` step for clarity in example workflow (props [@frankiebordone](https://github.com/frankiebordone), [@jeffpaul](https://github.com/jeffpaul), [@faisal-alvi](https://github.com/faisal-alvi) via [#154](https://github.com/10up/action-wordpress-plugin-deploy/pull/154)). 12 | 13 | ### Changed 14 | - Update our example with a new release asset action (props [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#150](https://github.com/10up/action-wordpress-plugin-deploy/pull/150)). 15 | - Update action examples to show an svn install step (props [@thrijith](https://github.com/thrijith), [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#155](https://github.com/10up/action-wordpress-plugin-deploy/pull/155)). 16 | 17 | ### Fixed 18 | - Install svn as part of the workflow if needed (props [@kirtangajjar](https://github.com/kirtangajjar), [@scott-sharethis](https://github.com/scott-sharethis), [@Surbma](https://github.com/Surbma), [@alicolville](https://github.com/alicolville), [@tobeyadr](https://github.com/tobeyadr), [@fumikito](https://github.com/fumikito), [@dkotter](https://github.com/dkotter) via [#160](https://github.com/10up/action-wordpress-plugin-deploy/pull/160)). 19 | - Typo in the `README` file (props [@pedro-mendonca](https://github.com/pedro-mendonca), [@faisal-alvi](https://github.com/faisal-alvi) via [#145](https://github.com/10up/action-wordpress-plugin-deploy/pull/145)). 20 | 21 | ### Developer 22 | - Replaced `lee-dohm/no-response` with `actions/stale` to help with closing no-response/stale issues (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#147](https://github.com/10up/action-wordpress-plugin-deploy/pull/147)). 23 | 24 | ## [2.2.2] - 2023-09-07 25 | ### Fixed 26 | - Ensure the deploy action works properly when a `.distignore` file is not present (props [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#137](https://github.com/10up/action-wordpress-plugin-deploy/pull/137)). 27 | 28 | ## [2.2.1] - 2023-09-05 29 | ### Fixed 30 | - Ensure built files are included when used without a `BUILD_DIR` and `.distignore` file (props [@akirk](https://github.com/akirk), [@iamdharmesh](https://github.com/iamdharmesh) via [#130](https://github.com/10up/action-wordpress-plugin-deploy/pull/130)). 31 | - Ensure a zip is generated when an existing version is found and the `generate-zip` input is set to `true` (props [@sy-records](https://github.com/sy-records), [@faisal-alvi](https://github.com/faisal-alvi) via [#133](https://github.com/10up/action-wordpress-plugin-deploy/pull/133)). 32 | 33 | ## [2.2.0] - 2023-05-18 34 | ### Added 35 | - `DRY RUN` mode support that can be used while testing this action (props [@mukeshpanchal27](https://github.com/mukeshpanchal27), [@joemcgill](https://github.com/joemcgill), [@felixarntz](https://github.com/felixarntz), [@jeffpaul](https://github.com/jeffpaul), [@aaemnnosttv](https://github.com/aaemnnosttv), [@dkotter](https://github.com/dkotter), [@stephywells](https://github.com/stephywells) via [#122](https://github.com/10up/action-wordpress-plugin-deploy/pull/122), [#127](https://github.com/10up/action-wordpress-plugin-deploy/pull/127)). 36 | - Release workflow automation (props [@dinhtungdu](https://github.com/dinhtungdu), [@Sidsector9](https://github.com/Sidsector9) via [#107](https://github.com/10up/action-wordpress-plugin-deploy/pull/107)). 37 | 38 | ### Changed 39 | - Generated zip now stores files with relative path for WP installation consistency (props [@JasonTheAdams](https://github.com/JasonTheAdams), [@helen](https://github.com/helen), [@dinhtungdu](https://github.com/dinhtungdu), [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter), [@shivapoudel](https://github.com/shivapoudel) via [#72](https://github.com/10up/action-wordpress-plugin-deploy/pull/72)). 40 | - Documentation updates (props [@UVLabs](https://github.com/UVLabs), [@jeffpaul](https://github.com/jeffpaul), [@mukeshpanchal27](https://github.com/mukeshpanchal27), [@10upsimon](https://github.com/10upsimon), [@joemcgill](https://github.com/joemcgill) via [#115](https://github.com/10up/action-wordpress-plugin-deploy/pull/115), [#120](https://github.com/10up/action-wordpress-plugin-deploy/pull/120)). 41 | 42 | ### Fixed 43 | - Replaced the deprecated `set-output` command with redirection to `$GITHUB_OUTPUT` (props [@sjinks](https://github.com/sjinks), [@dkotter](https://github.com/dkotter), [@cadic](https://github.com/cadic) via [#108](https://github.com/10up/action-wordpress-plugin-deploy/pull/108)). 44 | - Detected dubious ownership issue for github workspace (props [@rahulsprajapati](https://github.com/rahulsprajapati), [@dkotter](https://github.com/dkotter), [@Stiofan](https://github.com/Stiofan) via [#119](https://github.com/10up/action-wordpress-plugin-deploy/pull/119)). 45 | - Stop attempting to re-publish the same version of a plugin (props [@mukeshpanchal27](https://github.com/mukeshpanchal27), [@joemcgill](https://github.com/joemcgill), [@felixarntz](https://github.com/felixarntz), [@faisal-alvi](https://github.com/faisal-alvi) via [#124](https://github.com/10up/action-wordpress-plugin-deploy/pull/124)). 46 | 47 | ## [2.1.1] - 2022-08-15 48 | ### Fixed 49 | - Resolve SVN commit failed: Directory out of date (props [@dinhtungdu](https://github.com/dinhtungdu), [@richard-muvirimi](https://github.com/richard-muvirimi) via [#96](https://github.com/10up/action-wordpress-plugin-deploy/pull/96)). 50 | - Failure to set assets mime-type with `svn propset` (props [@diddledani](https://github.com/diddledani), [@dinhtungdu](https://github.com/dinhtungdu) via [#99](https://github.com/10up/action-wordpress-plugin-deploy/pull/99)). 51 | 52 | ## [2.1.0] - 2022-04-12 53 | ### Added 54 | - Mime type change to `image/gif` for `.gif` files (props [@doekenorg](https://github.com/doekenorg) via [#76](https://github.com/10up/action-wordpress-plugin-deploy/pull/76)). 55 | - Environment variable (`BUILD_DIR`) to deploy plugin files built into a custom directory (props [@dinhtungdu](https://github.com/dinhtungdu) via [#83](https://github.com/10up/action-wordpress-plugin-deploy/pull/83) and [#86](https://github.com/10up/action-wordpress-plugin-deploy/pull/86)). 56 | 57 | ### Fixed 58 | - Set correct mime type for for `.svg` files (props [@andrewheberle](https://github.com/andrewheberle) via [#78](https://github.com/10up/action-wordpress-plugin-deploy/pull/78)). 59 | - SVN error when plugin doesn't have an image (props [@Lewiscowles1986](https://github.com/Lewiscowles1986) via [#82](https://github.com/10up/action-wordpress-plugin-deploy/pull/82)). 60 | 61 | ## [2.0.0] - 2021-08-16 62 | **This is now a composite Action, meaning that it runs directly on the GitHub Actions runner rather than spinning up its own container and is significantly faster.** 63 | 64 | ### Added 65 | - Add `zip-path` output, as the `SLUG` may not match the repository name (props [@ocean90](https://github.com/ocean90) via [#74](https://github.com/10up/action-wordpress-plugin-deploy/pull/74)). 66 | 67 | ### Fixed 68 | - Avoid a Debian image issue where the container could not be built (props [@helen](https://github.com/helen) via [#74](https://github.com/10up/action-wordpress-plugin-deploy/pull/74)). 69 | 70 | ## [1.5.0] - 2020-05-27 71 | ### Added 72 | - Add optional ZIP file generation from SVN trunk to match content on WordPress.org (props [@shivapoudel](https://github.com/shivapoudel) via [#37](https://github.com/10up/action-wordpress-plugin-deploy/pull/37)). 73 | - Add example workflow file to attach the ZIP file to a GitHub release (props [@helen](https://github.com/helen) via [#42](https://github.com/10up/action-wordpress-plugin-deploy/pull/42)). 74 | - Set mime types on images in the SVN `assets` directory to prevent forced downloads on WordPress.org (props [@nextgenthemes](https://github.com/nextgenthemes) via [#40](https://github.com/10up/action-wordpress-plugin-deploy/pull/40)). 75 | 76 | ## [1.4.1] - 2020-03-12 77 | ### Fixed 78 | - Ensure previously committed files that are later added to `.distignore` get deleted (props [@pascalknecht](https://github.com/pascalknecht) via [#26](https://github.com/10up/action-wordpress-plugin-deploy/pull/26)). 79 | - Escape filenames to avoid errors with filenames containing an `@` symbol (props [@Gaya](https://github.com/Gaya) via [#22](https://github.com/10up/action-wordpress-plugin-deploy/pull/22)). 80 | - Use parameter expansion instead of `sed` to remove `v` from version numbers (props [@szepeviktor](https://github.com/szepeviktor) via [#24](https://github.com/10up/action-wordpress-plugin-deploy/pull/24)). 81 | - Use `https` for WordPress.org URLs (props [@dinhtungdu](https://github.com/dinhtungdu) via [#28](https://github.com/10up/action-wordpress-plugin-deploy/pull/28)). 82 | - Correct encrypted secrets documentation link (props [@felipeelia](https://github.com/felipeelia) via [#20](https://github.com/10up/action-wordpress-plugin-deploy/pull/20)). 83 | 84 | ## [1.4.0] - 2019-10-21 85 | ### Added 86 | - Strip leading `v` off of tag name if present, as it is remains common practice with Git tags. 87 | 88 | ### Fixed 89 | - Avoid failure if no assets directory exists. 90 | 91 | ## [1.3.0] - 2019-08-30 92 | ### Added 93 | - Added the ability to use `.distignore` to exclude files from deployment instead of `.gitattributes`, which works better when a build step is included (props [@LeoColomb](https://github.com/LeoColomb) via [#3](https://github.com/10up/action-wordpress-plugin-deploy/pull/3), with additional thanks to [@markjaquith](https://github.com/markjaquith) for consultation). 94 | 95 | ### Changed 96 | - Removed unnecessary `GITHUB_TOKEN` check/requirement. 97 | 98 | ## [1.2.1] - 2019-08-22 99 | ### Fixed 100 | - Use more robust method of copying files (`-c` flag for `rsync`). 101 | 102 | [Unreleased]: https://github.com/10up/action-wordpress-plugin-deploy/compare/stable...develop 103 | [2.3.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.2.2...2.3.0 104 | [2.2.2]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.2.1...2.2.2 105 | [2.2.1]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.2.0...2.2.1 106 | [2.2.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.1.1...2.2.0 107 | [2.1.1]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.1.0...2.1.1 108 | [2.1.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.0.0...2.1.0 109 | [2.0.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/1.5.0...2.0.0 110 | [1.5.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/1.4.1...1.5.0 111 | [1.4.1]: https://github.com/10up/action-wordpress-plugin-deploy/compare/1.4.0...1.4.1 112 | [1.4.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/1.3.0...1.4.0 113 | [1.3.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/1.2.1...1.3.0 114 | [1.2.1]: https://github.com/10up/action-wordpress-plugin-deploy/compare/03e175e...d2b6608 115 | --------------------------------------------------------------------------------