diff --git a/README.md b/README.md index 779e18e..f2e6bf5 100644 --- a/README.md +++ b/README.md @@ -71,70 +71,13 @@ If there are files or directories to be excluded from deployment, such as tests ## Example Workflow Files -To 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, but it must be in that directory. The usage of `ubuntu-latest` is recommended for compatibility with required dependencies in this Action. - -### Deploy on pushing a new tag - -```yml -name: Deploy to WordPress.org -on: - push: - tags: - - "*" -jobs: - tag: - name: New tag - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Build # Remove or modify this step as needed - run: | - npm install - npm run build - - name: WordPress Plugin Deploy - uses: 10up/action-wordpress-plugin-deploy@stable - env: - SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} - SVN_USERNAME: ${{ secrets.SVN_USERNAME }} - SLUG: my-super-cool-plugin # optional, remove if GitHub repo name matches SVN slug, including capitalization -``` +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. -### Deploy on publishing a new release and attach a ZIP file to the release - -```yml -name: Deploy to WordPress.org -on: - release: - types: [published] -jobs: - tag: - name: New release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Build - run: | - npm install - npm run build - - 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: ${{ steps.deploy.outputs.zip-path }} - asset_name: ${{ github.event.repository.name }}.zip - asset_content_type: application/zip -``` +Current set of example workflow files: + +* [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) +* [Deploy on pushing a new tag](examples/deploy-on-pushing-a-new-tag.yml) +* [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) ## Contributing