diff --git a/.distignore b/.distignore index f84aa77..baae112 100644 --- a/.distignore +++ b/.distignore @@ -3,6 +3,7 @@ /.github /node_modules /src +/tests # Configuration files .distignore diff --git a/.gitattributes b/.gitattributes index d7cd88a..0362ae1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,6 +3,7 @@ /.github export-ignore /node_modules export-ignore /src export-ignore +/tests export-ignore # Configuration files /.distignore export-ignore diff --git a/.github/workflows/pull-request-version.yml b/.github/workflows/pull-request-version.yml index 2d2df4e..7ae8b57 100644 --- a/.github/workflows/pull-request-version.yml +++ b/.github/workflows/pull-request-version.yml @@ -1,4 +1,4 @@ -name: "Check plugin version and tags" +name: "Check plugin version and release files" on: pull_request: branches: @@ -6,33 +6,19 @@ on: jobs: version-check: - name: "Check version doesn't not already exists." + name: "Version bump, tag, and file checks" runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - id: set-vars - name: "Set variables from .plugin-data file" - run: | - # Get all data from .plugin-data file - content=`cat ./.plugin-data` - # the following lines are only required for multi line json - content="${content//'%'/'%25'}" - content="${content//$'\n'/'%0A'}" - content="${content//$'\r'/'%0D'}" - # end of optional handling for multi line json - echo "::set-output name=pluginData::$content" + - name: Fetch tags + run: git fetch --tags --prune origin - - id: version-check - name: "Check version in .plugin-data is not existing" - run: | - # Check version from .plugin-data - VERSION=${{fromJson(steps.set-vars.outputs.pluginData).version}} - - if git rev-parse "$VERSION" >/dev/null 2>&1; then - echo "Tag aleady exists please update the .plugin-data file to good version"; - exit 1; - fi + - name: Verify version bump and release files + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: tests/bin/check-release-version.sh diff --git a/.github/workflows/quality-js.yml b/.github/workflows/quality-js.yml index 77bb2ed..16fdf38 100644 --- a/.github/workflows/quality-js.yml +++ b/.github/workflows/quality-js.yml @@ -4,9 +4,11 @@ on: pull_request: paths: - 'src/**' + - 'package.json' push: paths: - 'src/**' + - 'package.json' branches: - main diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index 6a0c841..54ae95f 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -11,8 +11,8 @@ "pluginData": { "resource": "git:directory", "url": "https://github.com/BeAPI/blockparty-modal", - "ref": "main", - "refType": "branch" + "ref": "1.0.7", + "refType": "tag" }, "options": { "activate": true, @@ -30,7 +30,7 @@ }, { "step": "runPHP", - "code": "\n
\n\n\n\n\n'; $page_id = wp_insert_post( array( 'post_title' => 'Blockparty Modal', 'post_name' => 'blockparty-modal-demo', 'post_content' => $page_content, 'post_status' => 'publish', 'post_type' => 'page' ) ); echo 'Page created with ID: ' . $page_id; ?>" + "code": "\nClick on the button below to reveal a dialog window.
\n\n\n\n\n