Repository navigation
Release 1.0.0 #3
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
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d23e052
feat: add initial files
firestar300 e0d19d4
ci: change node version
firestar300 c384fbd
fix: Icons rewritten outside buttons
firestar300 8aff663
fix: Nofollow appended on every update
firestar300 8965cf8
fix: Removing icon leaves inner blocks
firestar300 f1d2395
fix: Icon inner block inserted twice
firestar300 817d2bf
fix: Editor replaces React icon nodes
firestar300 982a75b
fix: Release workflow cannot push tags
firestar300 19f8129
fix: Locked inner icons are not removed
firestar300 f51ced2
test(ci): add phpunit, jest, and playwright suites
firestar300 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,27 @@ | ||
| /.git | ||
| /.github | ||
| /.wordpress-org | ||
| /node_modules | ||
| /src | ||
| /tests | ||
|
|
||
| .distignore | ||
| .editorconfig | ||
| .eslintrc | ||
| .gitattributes | ||
| .gitignore | ||
| .plugin-data | ||
| .stylelintrc | ||
| .wp-env.json | ||
| CHANGELOG.md | ||
| composer.json | ||
| composer.lock | ||
| grumphp.yml | ||
| LICENSE.md | ||
| package.json | ||
| package-lock.json | ||
| phpcs.xml.dist | ||
| phpunit.xml.dist | ||
| README.md | ||
| webpack.config.js | ||
| yarn.lock |
This file contains hidden or 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,18 @@ | ||
| # This file is for unifying the coding style for different editors and IDEs | ||
| # editorconfig.org | ||
|
|
||
| # WordPress Coding Standards | ||
| # https://make.wordpress.org/core/handbook/coding-standards/ | ||
|
|
||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
| indent_style = tab | ||
|
|
||
| [*.{yml,yaml}] | ||
| indent_style = space | ||
| indent_size = 2 |
This file contains hidden or 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,30 @@ | ||
| /.git export-ignore | ||
| /.github export-ignore | ||
| /.wordpress-org export-ignore | ||
| /src/ export-ignore -diff | ||
| /vendor/ export-ignore -diff | ||
| /node_modules export-ignore | ||
| /tests export-ignore | ||
|
|
||
| /.distignore export-ignore | ||
| /.editorconfig export-ignore | ||
| /.eslintrc export-ignore | ||
| /.gitattributes export-ignore | ||
| /.gitignore export-ignore | ||
| /.plugin-data export-ignore | ||
| /.stylelintrc export-ignore | ||
| /.wp-env.json export-ignore | ||
| /.wp-env.test.json export-ignore | ||
| /CHANGELOG.md export-ignore | ||
| /composer.json export-ignore | ||
| /composer.lock export-ignore -diff | ||
| /eslint.config.cjs export-ignore -diff | ||
| /grumphp.yml export-ignore | ||
| /LICENSE.md export-ignore | ||
| /package.json export-ignore | ||
| /package-lock.json export-ignore -diff | ||
| /phpcs.xml.dist export-ignore | ||
| /phpunit.xml.dist export-ignore | ||
| /README.md export-ignore | ||
| /webpack.config.js export-ignore | ||
| /yarn.lock export-ignore |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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,24 @@ | ||
| name: "Check plugin version and release files" | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| version-check: | ||
| name: "Version bump, tag, and file checks" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Fetch tags | ||
| run: git fetch --tags --prune origin | ||
|
|
||
| - 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 |
This file contains hidden or 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,48 @@ | ||
| name: Javascript Quality Checks | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'src/**' | ||
| - '.stylelintrc' | ||
| - 'package.json' | ||
| - 'package-lock.json' | ||
| push: | ||
| paths: | ||
| - 'src/**' | ||
| - '.stylelintrc' | ||
| - 'package.json' | ||
| - 'package-lock.json' | ||
| branches: | ||
| - main | ||
|
|
||
| # Cancels all previous workflow runs for pull requests that have not completed. | ||
| concurrency: | ||
| # The concurrency group contains the workflow name and the branch name for pull requests | ||
| # or the commit hash for any other events. | ||
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| checks: | ||
| name: Lint JS and CSS | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout project | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Setup NodeJS | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version-file: 'package.json' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install npm dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run wp-script lint:js on src folder | ||
| run: npm run lint:js src | ||
|
|
||
| - name: Run stylelint on SCSS | ||
| run: npm run lint:css -- "src/**/*.scss" |
This file contains hidden or 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,48 @@ | ||
| name: PHP Quality Checks | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'composer.json' | ||
| - 'blockparty-button-icon.php' | ||
| - 'classes/**' | ||
| - 'phpcs.xml.dist' | ||
| push: | ||
| paths: | ||
| - 'composer.json' | ||
| - 'blockparty-button-icon.php' | ||
| - 'classes/**' | ||
| - 'phpcs.xml.dist' | ||
| branches: | ||
| - main | ||
|
|
||
| # Cancels all previous workflow runs for pull requests that have not completed. | ||
| concurrency: | ||
| # The concurrency group contains the workflow name and the branch name for pull requests | ||
| # or the commit hash for any other events. | ||
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| checks: | ||
| name: Codesniffer | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout project | ||
| uses: actions/checkout@v7 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: 8.1 | ||
| extensions: mbstring, intl | ||
|
|
||
| - name: Validate composer file | ||
| run: composer validate | ||
|
|
||
| - name: Install composer dependencies | ||
| run: composer install | ||
|
|
||
| - name: Run codesniffer | ||
| run: composer cs |
This file contains hidden or 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,87 @@ | ||
| name: "Release new TAG" | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| build-and-release: | ||
| name: "Release new TAG" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| fetch-depth: 0 | ||
| fetch-tags: true | ||
|
|
||
| - name: Fetch tags | ||
| run: git fetch --tags --prune origin | ||
|
|
||
| - id: set-vars | ||
| name: "Set variable from .plugin-data file" | ||
| run: | | ||
| { | ||
| echo 'pluginData<<EOF' | ||
| cat ./.plugin-data | ||
| echo 'EOF' | ||
| } >> "$GITHUB_OUTPUT" | ||
|
|
||
| - id: check-version | ||
| name: "Check version does not exists" | ||
| run: | | ||
| # Get the version from .plugin-data file. | ||
| VERSION=${{ fromJson(steps.set-vars.outputs.pluginData).version }} | ||
|
|
||
| echo "Get Branch tag" | ||
| if git rev-parse "$VERSION" >/dev/null 2>&1; then | ||
| echo "Tag already exists, stop now"; | ||
| exit 1; | ||
| fi | ||
|
|
||
| if git ls-remote --exit-code --tags origin "refs/tags/${VERSION}" >/dev/null 2>&1; then | ||
| echo "Remote tag already exists, stop now"; | ||
| exit 1; | ||
| fi | ||
|
|
||
| - id: build-node | ||
| name: Setup NodeJS | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version-file: 'package.json' | ||
| cache: 'npm' | ||
| - run: npm ci | ||
| - run: npm run build | ||
|
|
||
| - id: build-php | ||
| name: "Build project PHP" | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: 8.1 | ||
| - run: composer install --prefer-dist --no-dev -o --ignore-platform-reqs | ||
|
|
||
| - id: commit-and-push | ||
| name: "Commit and push new TAG" | ||
| run: | | ||
| # Get the version from .plugin-data file. | ||
| VERSION=${{ fromJson(steps.set-vars.outputs.pluginData).version }} | ||
|
|
||
| echo "Copy .distignore to .gitignore" | ||
| cp .distignore .gitignore | ||
|
|
||
| echo "Configure git" | ||
| git config --local user.email "$(git log --format='%ae' HEAD^!)" | ||
| git config --local user.name "$(git log --format='%an' HEAD^!)" | ||
|
|
||
| echo "Creating branch" | ||
| git checkout -b "release/${VERSION}" | ||
|
|
||
| echo "Creating tag ${VERSION}" | ||
| git add . | ||
| git add -u | ||
| git commit -m "Release version ${VERSION}" | ||
| git tag ${VERSION} | ||
| git push --tags | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Release job fails after first tag
High Severity
The main-branch release workflow treats an already-published
.plugin-dataversion as a hard failure. After1.0.0is tagged, every later push tomainthat does not bump the version exits with status1, so the release job stays red until the next version change.Reviewed by Cursor Bugbot for commit aa40619. Configure here.