Add build commands
This commit is contained in:
parent
9e6f1f699a
commit
a66d7b544f
6 changed files with 64 additions and 33 deletions
36
.distignore
36
.distignore
|
@ -1,18 +1,34 @@
|
|||
/.wordpress-org
|
||||
/.git
|
||||
/.github
|
||||
/.phpdoc
|
||||
/_tools
|
||||
/contrib
|
||||
/development
|
||||
/vendor
|
||||
|
||||
# A set of files you probably don't want in your WordPress.org distribution
|
||||
.distignore
|
||||
.editorconfig
|
||||
.git
|
||||
.gitignore
|
||||
|
||||
.gitlab-ci.yml
|
||||
.travis.yml
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
behat.yml
|
||||
bin
|
||||
circle.yml
|
||||
composer.json
|
||||
composer.lock
|
||||
Gruntfile.js
|
||||
package.json
|
||||
phpunit.xml
|
||||
phpunit.xml.dist
|
||||
multisite.xml
|
||||
multisite.xml.dist
|
||||
phpcs.ruleset.xml
|
||||
CONTRIBUTING.md
|
||||
README.md
|
||||
SECURITY.md
|
||||
LICENSE
|
||||
wp-cli.local.yml
|
||||
tests
|
||||
vendor
|
||||
node_modules
|
||||
*.sql
|
||||
*.tar.gz
|
||||
*.zip
|
||||
authors.txt
|
||||
composer.*
|
||||
|
|
44
.github/workflows/deploy-to-wordpress.org.yml
vendored
44
.github/workflows/deploy-to-wordpress.org.yml
vendored
|
@ -12,26 +12,34 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
#- name: Build
|
||||
#run: |
|
||||
#composer install
|
||||
#composer run build
|
||||
- name: Build
|
||||
run: |
|
||||
composer install --no-dev --optimize-autoloader
|
||||
composer run build
|
||||
|
||||
- name: WordPress Plugin Deploy
|
||||
id: deploy
|
||||
uses: 10up/action-wordpress-plugin-deploy@stable
|
||||
- name: Create artifact
|
||||
uses: montudor/action-zip@stable
|
||||
with:
|
||||
generate-zip: true
|
||||
env:
|
||||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
|
||||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
|
||||
args: zip -X -r dist/footnotes.zip dist
|
||||
|
||||
#- 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 assets
|
||||
uses: actions/upload-release-asset@v1
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: footnotes
|
||||
path: dist/footnotes.zip
|
||||
|
||||
- name: Upload to release
|
||||
uses: JasonEtco/upload-to-release@master
|
||||
with:
|
||||
args: dist/footnotes.zip application/zip
|
||||
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
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,6 @@
|
|||
.phpdoc/
|
||||
vendor/
|
||||
dist/
|
||||
|
||||
*.bak
|
||||
authors.txt
|
||||
|
|
6
_tools/build.sh
Executable file
6
_tools/build.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
rm -r dist/
|
||||
mkdir dist
|
||||
cp -r -t dist class/ css/ js/ img/ languages/ templates/
|
||||
cp -t dist features.txt license.txt readme.txt footnotes.php includes.php
|
0
_tools/setup.sh
Normal file → Executable file
0
_tools/setup.sh
Normal file → Executable file
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "markcheret/footnotes",
|
||||
"scripts": {
|
||||
"build": "./_tools/build.sh",
|
||||
"post-install-cmd": "./_tools/setup.sh"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
|
||||
"wp-coding-standards/wpcs": "^2.3"
|
||||
},
|
||||
"scripts": {
|
||||
"post-install-cmd": [
|
||||
"bash _tools/setup.sh"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue