introduce GitHub actions for automated plugin/asset deployment

This commit is contained in:
Stefan Kalscheuer 2021-03-14 11:16:17 +01:00
parent a5e4225261
commit 91b612425b
4 changed files with 58 additions and 0 deletions

16
.distignore Normal file
View File

@ -0,0 +1,16 @@
/.git
/.github
/assets
/test
/.distignore
/.gitattributes
/.gitignore
/.travis.yml
/composer.json
/composer.lock
/CONTRIBUTING.md
/package.json
/package-lock.json
/phpcs.xml
/phpunit.xml
/RoboFile.php

2
.gitattributes vendored
View File

@ -1,5 +1,7 @@
/.github export-ignore
/assets export-ignore
/test export-ignore
.distignore export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore

View File

@ -0,0 +1,20 @@
name: Plugin asset/readme update
on:
push:
branches:
- master
jobs:
master:
name: Push to master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Clean README.md
run: tail -n +6 README.md > README.md.tmp && mv README.md.tmp README.md
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
ASSETS_DIR: assets
README_NAME: README.md
SVN_PASSWORD: ${{ secrets.WP_SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.WP_SVN_USERNAME }}

View File

@ -0,0 +1,20 @@
name: Deploy to WordPress.org
on:
push:
tags:
- "v*"
- "!v*-*"
jobs:
tag:
name: New tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Clean README.md
run: tail -n +6 README.md > README.md.tmp && mv README.md.tmp README.md
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
ASSETS_DIR: assets
SVN_PASSWORD: ${{ secrets.WP_SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.WP_SVN_USERNAME }}