Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action to automatically publish releases to wordpress.org Subversion #55

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.wordpress-org
.git
.github
.circleci
node_modules
scripts
css/src
js/src
.gitattributes
.gitignore
Gulpfile.js
Gruntfile.js
package.json
package-lock.json
phpcs.xml
README.md
.gitattributes
.distignore
.DS_Store
composer.json
composer.lock
output.log
docker_tag
27 changes: 27 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# Auto detect text files and perform LF normalization
* text=auto

# Directories
/.wordpress-org export-ignore
/.git export-ignore
/.github export-ignore
/.circleci export-ignore
/node_modules export-ignore
/scripts export-ignore
/css/src export-ignore
/js/src export-ignore

# Files
/.gitattributes export-ignore
/.gitignore export-ignore
/.distignore export-ignore
/Gulpfile.js export-ignore
/Gruntfile.js export-ignore
/package.json export-ignore
/package-lock.json export-ignore
/phpcs.xml export-ignore
/README.md export-ignore
/.gitattributes export-ignore
/.DS_Store export-ignore
/composer.json export-ignore
/composer.lock export-ignore
/output.log export-ignore
/docker_tag export-ignore
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy to WordPress.org
on:
release:
types: [published]
jobs:
tag:
name: New release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
uses: php-actions/composer@v5
with:
dev: no
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Build
run: |
npm install
- 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