Skip to content

Commit

Permalink
Adding GH workflow for WP releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeet committed Jul 26, 2021
1 parent e16bc4c commit 2c6b977
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.wordpress-org
/.git
/.github

.distignore
.gitignore
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Directories
/.wordpress-org export-ignore
/.github export-ignore

# Files
/.gitattributes export-ignore
/.gitignore export-ignore
28 changes: 28 additions & 0 deletions .github/workflows/wp-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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: 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

0 comments on commit 2c6b977

Please sign in to comment.