Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gaambo committed Mar 31, 2024
0 parents commit 5a4cc37
Show file tree
Hide file tree
Showing 79 changed files with 45,869 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@wordpress/babel-preset-default")],
};
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples
10 changes: 10 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"plugin:@wordpress/eslint-plugin/recommended"
],
"rules": {
"jsdoc/no-undefined-types": "off",
"jsdoc/require-returns-description": "off",
"jsdoc/valid-types": "off"
}
}
55 changes: 55 additions & 0 deletions .github/workflows/example-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build examples plugin

on:
release:
types: [ published ]

jobs:
build_and_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Install library npm dependencies
run: npm ci

- name: Build library dist files
run: npm run build

- name: Install all npm packages
working-directory: examples
run: npm ci

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Build composer cache
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
working-directory: examples
run: |
composer install -o -q
- name: Build files
working-directory: examples
run: npm run build

- name: Build plugin zip file
working-directory: examples
run: npm run plugin-zip

- name: Upload dist archive to release
uses: softprops/action-gh-release@v1
with:
files: examples/goodenberg-examples.zip
27 changes: 27 additions & 0 deletions .github/workflows/npm-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish NPM Package
on:
release:
types: [ published ]
jobs:
build_and_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Configure git user name and email
run: |
git config user.name "GoodWP Bot"
git config user.email "git@goodwp.io"
- name: Install all npm packages
run: npm ci
# Building is automatically done by "prepare" npm script.

- name: Release package
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/php-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish PHP Package
on:
release:
types: [ published ]
jobs:
composer-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Build composer cache
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer install -o -q
- name: Create archive name
id: composer-archive
run: echo "zip-path=goodwp-goodenberg-${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT

- name: Create archive
id: create-archive
run: composer archive --format=zip --file ${{ steps.composer-archive.outputs.zip-path }}

- name: Upload dist archive to release
uses: softprops/action-gh-release@v1
with:
files: ${{ steps.composer-archive.outputs.zip-path }}.zip
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
vendor
dist

.idea
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const wordPressConfig = require("@wordpress/prettier-config");

module.exports = {
...wordPressConfig,
useTabs: false,
bracketSameLine: true,
singleQuote: false,
};
8 changes: 8 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"phpVersion": "8.1",
"core": "WordPress/WordPress#master",
"mappings": {
"wp-content/plugins/goodenberg-examples": "./examples",
"wp-content/plugins/goodenberg-examples/vendor/goodwp/goodenberg/lib": "./lib"
}
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# v0.1.0 (2024-03-31)

First public release.
This is still in development and breaking changes may occur until version 1.0.0 is released.
Loading

0 comments on commit 5a4cc37

Please sign in to comment.