-
Notifications
You must be signed in to change notification settings - Fork 314
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
Build assets during the release #2486
Changes from all commits
5321dae
37828ae
fd0648f
f949e0d
22f1e4b
9963ef1
76ff43b
cb44b6c
e272ae0
2cc58e8
ef50b7c
94f51b5
b217377
7079302
6170410
b785128
91b4748
1fe2093
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/.git | ||
/.github | ||
/.wordpress-org | ||
/bin | ||
/config | ||
/docs | ||
/gulp-tasks | ||
/lang | ||
/tests | ||
/vendor/ | ||
/node_modules | ||
|
||
/.babelrc | ||
/.browserslistrc | ||
/.editorconfig | ||
/.eslintignore | ||
/.eslintrc.js | ||
/.distignore | ||
/.gitignore | ||
/.travis.yml | ||
/.stylelintrc | ||
/CHANGELOG.md | ||
/CODE_OF_CONDUCT.md | ||
/composer.json | ||
/composer.lock | ||
/CONTRIBUTING.md | ||
/CREDITS.md | ||
/gulpfile.babel.js | ||
/hookdoc-conf.json | ||
/LICENSE.md | ||
/package.json | ||
/package-lock.json | ||
/phpcs.xml | ||
/phpunit.xml.dist | ||
/postcss.config.js | ||
/README.md | ||
/SECURITY.md | ||
/run-wpacceptance.sh | ||
/single-site.xml.dist | ||
/webpack.config.js | ||
/wpacceptance.json |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,51 @@ | ||
name: Deploy to WordPress.org | ||
name: Publish New Release | ||
|
||
env: | ||
SLUG: "elasticpress" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
tag: | ||
name: New tag | ||
name: New release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: install node v10 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10 | ||
|
||
- name: Build | ||
run: | | ||
npm install | ||
npm run build | ||
|
||
- name: WordPress Plugin Deploy | ||
if: "! github.event.release.prerelease" | ||
id: deploy | ||
uses: 10up/action-wordpress-plugin-deploy@stable | ||
env: | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SLUG: elasticpress | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SLUG: ${{ env.SLUG }} | ||
|
||
- name: Create ZIP | ||
run: | | ||
TMP_DIR="${HOME}/archive/${{ env.SLUG }}" | ||
mkdir -p $TMP_DIR | ||
rsync -rc --exclude-from="${{ github.workspace }}/.distignore" "${{ github.workspace }}/" "$TMP_DIR/" && cd $TMP_DIR/.. && zip -r "${{ github.workspace }}/${{ env.SLUG }}.zip" . | ||
|
||
- 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 }}/${{ env.SLUG }}.zip | ||
asset_name: elasticpress-${{ github.ref_name }}.zip | ||
asset_content_type: application/zip |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/vendor/ | ||
node_modules | ||
/dist | ||
.idea | ||
.history | ||
docs-built | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that you could tweak this, see sample action workflow here: https://github.com/10up/action-wordpress-plugin-deploy#deploy-on-publishing-a-new-release-and-attach-a-zip-file-to-the-release