-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,073 additions
and
2,540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Run composer install | ||
run: | | ||
composer clear-cache | ||
composer install --no-dev --prefer-dist | ||
- name: Install npm packages | ||
run: | | ||
npm ci | ||
- name: Build | ||
run: | | ||
npm install | ||
npm run build | ||
npm run i18n | ||
- name: Semantic release | ||
id: semantic | ||
uses: codfish/semantic-release-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: WordPress Plugin Deploy | ||
id: deploy | ||
if: steps.semantic.outputs.new-release-published == 'true' | ||
uses: 10up/[email protected] | ||
with: | ||
generate-zip: true | ||
env: | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | ||
SLUG: simple-tabs-block | ||
VERSION: ${{ steps.semantic.outputs.release-version }} | ||
- 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: ${{ steps.deploy.outputs.zip-path }} | ||
asset_name: ${{ github.event.repository.name }}.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,6 @@ node_modules/ | |
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# Build files | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module.exports = { | ||
tagFormat: "${version}", | ||
branch: "master", | ||
plugins: [ | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "changelog.txt" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["changelog.txt"] | ||
} | ||
], | ||
["@semantic-release/npm", { npmPublish: false }], | ||
"@semantic-release/github", | ||
[ | ||
"semantic-release-plugin-update-version-in-files", | ||
{ | ||
"files": [ | ||
"simple-tabs-block.php", | ||
"readme.txt", | ||
"build/tab/block.json", | ||
"build/tabs/block.json" | ||
], | ||
"placeholder": "0.0.0-development" | ||
} | ||
] | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
PLUGIN_SLUG="simple-tabs-block" | ||
PROJECT_PATH="." | ||
BUILD_PATH="./dist" | ||
DEST_PATH="$BUILD_PATH/$PLUGIN_SLUG" | ||
|
||
echo "Generating build directory..." | ||
rm -rf "$BUILD_PATH" | ||
mkdir -p "$DEST_PATH" | ||
|
||
echo "Installing JS dependencies..." | ||
npm i | ||
|
||
echo "Running JS Build..." | ||
npm run build || exit "$?" | ||
|
||
echo "Syncing files..." | ||
rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PATH/" --delete --delete-excluded | ||
|
||
echo "Generating zip file..." | ||
cd "$BUILD_PATH" || exit | ||
zip -q -r "${PLUGIN_SLUG}.zip" "$PLUGIN_SLUG/" | ||
|
||
cd "$PROJECT_PATH" || exit | ||
echo "${PLUGIN_SLUG}.zip file generated!" | ||
|
||
echo "Build done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '997450abebb6814b2007d947b9d3e04d'); | ||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '7e39060d8b5299a21575d03bb9af168e'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
/*!********************************************************************************************************************************************************************************************************************************************!*\ | ||
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./src/tab/editor.scss ***! | ||
\********************************************************************************************************************************************************************************************************************************************/ | ||
|
Oops, something went wrong.