Skip to content

Commit

Permalink
release: v1.2.0
Browse files Browse the repository at this point in the history
- Initial release of free version of Hyve
  • Loading branch information
HardeepAsrani authored Jul 15, 2024
2 parents f688260 + dc87afa commit 8767d19
Show file tree
Hide file tree
Showing 73 changed files with 35,232 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Browsers that we support

last 1 version
> 1%
not ie > 0
not ie_mob > 0
not dead
37 changes: 37 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.git
.distignore
.gitignore
.travis.yml
.jshintrc
Gruntfile.js
phpcs.xml
.eslintrc
.gitattributes
.releaserc.yml
.DS_Store
.editorconfig
.browserslistrc
postcss.config.js
docker-compose.yml
webpack.config.js
CONTRIBUTING.md
package.json
composer.json
composer.lock
package-lock.json
themeisle-hash.json
npm-debug.log
phpstan.neon
tailwind.config.js
/grunt
/node_modules
/logs
/.github
/.wordpress-org
/.idea
/src
/bin
/tests
/phpunit.xml
/dist
/artifact
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
66 changes: 66 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": "wordpress",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2021,
"sourceType": "module"
},
"ignorePatterns": [ "node_modules", "assets" ],
"rules": {
"indent": [
"error",
"tab"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"prefer-destructuring": [
"warn",
{
"array": false,
"object": true
},
{
"enforceForRenamedProperties": false
}
],
"array-bracket-spacing": [
"warn",
"always",
{
"arraysInArrays": false,
"objectsInArrays": false
}
],
"key-spacing": [
"warn",
{
"beforeColon": false,
"afterColon": true
}
],
"object-curly-spacing": [
"warn",
"always",
{
"arraysInObjects": true,
"objectsInObjects": false
}
],
}
}
31 changes: 31 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
Gruntfile.js export-ignore
sample-theme export-ignore
docker-compose.yml export-ignore
.releaserc.json export-ignore
composer.json export-ignore
composer.lock export-ignore
.nvmrc export-ignore
package.json export-ignore
package-lock.json export-ignore
phpcs.xml export-ignore
phpunit.xml export-ignore
README.md export-ignore
tests export-ignore
bin export-ignore
README.md export-ignore
# Set the default behavior for all files.
* text=auto

# Normalized and converts to
# native line endings on checkout.
*.php text

# Convert to LF line endings on checkout.
*.sh text eol=lf

# Binary files.
*.png binary
*.jpg binary
8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
regression:
- '(Yes, this is a regression)'

customer report:
- '(helpscout|wordpress.org/support)'

doc-needed:
- '(Yes, it requires documentation.)'
100 changes: 100 additions & 0 deletions .github/workflows/create-buld-url.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Build and publish the ZIP build file

on:
pull_request:
types: [opened, synchronize, ready_for_review]
branches-ignore:
- 'update_dependencies'
jobs:
dev-zip:
name: Build ZIP and upload to s3
if: github.event.pull_request.draft == false && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
outputs:
branch-name: ${{ steps.retrieve-branch-name.outputs.branch_name }}
git-sha-8: ${{ steps.retrieve-git-sha-8.outputs.sha8 }}
steps:
- name: Check out source files
uses: actions/checkout@v2
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Configure Composer cache
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install composer deps
run: composer install --no-dev --prefer-dist --no-progress --no-suggest
- name: Install npm deps
run: npm ci
- name: Build files
run: npm run build
- name: Create zip
run: npm run dist
- name: Retrieve branch name
id: retrieve-branch-name
run: echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
- name: Retrieve git SHA-8 string
id: retrieve-git-sha-8
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: Upload Latest Version to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_DEV_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_KEY_ARTIFACTS }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_ARTIFACTS }}
SOURCE_DIR: artifact/
DEST_DIR: ${{ github.event.pull_request.base.repo.name }}-${{ steps.retrieve-branch-name.outputs.branch_name }}-${{ steps.retrieve-git-sha-8.outputs.sha8 }}/

comment-on-pr:
name: Comment on PR with links to plugin ZIPs
if: ${{ github.head_ref && github.head_ref != null }}
runs-on: ubuntu-latest
needs: dev-zip
env:
CI: true
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
outputs:
pr_number: ${{ steps.get-pr-number.outputs.num }}
comment_body: ${{ steps.get-comment-body.outputs.body }}
steps:
- name: Get PR number
id: get-pr-number
run: echo "::set-output name=num::$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')"

- name: Check if a comment was already made
id: find-comment
uses: peter-evans/find-comment@v2
with:
issue-number: ${{ steps.get-pr-number.outputs.num }}
comment-author: github-actions[bot]
body-includes: Download Plugin - [Download]

- name: Get comment body
id: get-comment-body
run: |
body="Plugin build for ${{ github.event.pull_request.head.sha }} is ready :bellhop_bell:!
- Download Plugin - [Download](https://verti-artifacts.s3.amazonaws.com/${{ github.event.pull_request.base.repo.name }}-${{ needs.dev-zip.outputs.branch-name }}-${{ needs.dev-zip.outputs.git-sha-8 }}/hyve-lite.zip)"
body="${body//$'\n'/'%0A'}"
echo "::set-output name=body::$body"
- name: Create comment on PR with links to plugin builds
if: ${{ steps.find-comment.outputs.comment-id == '' }}
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ steps.get-pr-number.outputs.num }}
body: ${{ steps.get-comment-body.outputs.body }}

- name: Update comment on PR with links to plugin builds
if: ${{ steps.find-comment.outputs.comment-id != '' }}
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
edit-mode: replace
body: ${{ steps.get-comment-body.outputs.body }}
44 changes: 44 additions & 0 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
branches:
- main
jobs:
create_tag:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@master
with:
persist-credentials: false
- name: Build files using ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Release new version
id: release
run: |
npm ci
npm run release
env:
CI: true
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
GIT_AUTHOR_NAME: themeisle[bot]
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }}
GIT_COMMITTER_NAME: themeisle[bot]
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_ANNOUNCEMENTS }}
SEMANTIC_RELEASE_PACKAGE: Hyve Lite
empty-job:
# if no jobs run, github action considers it a test failure -- which seems like a bug
# this makes it so the top-level if statement for the job does not give status failure.
runs-on: ubuntu-latest
if: success()
steps:
- name: Meep
run: |
echo "Nothing to do"
52 changes: 52 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy
on:
push:
tags:
- "*"
jobs:
tag:
name: Deploy to WordPress.org
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Install composer deps
run: composer install --no-dev --prefer-dist --no-progress --no-suggest
- name: Install npm deps
run: npm ci
- name: Build files
run: npm run build
- name: Build zip
run: npm run dist
- name: Upload Latest Version to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DOWNLOADS }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DOWNLOADS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DOWNLOADS_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
SOURCE_DIR: 'artifact' # optional: defaults to entire repository
DEST_DIR: ${{ secrets.S3_AWS_PRODUCTS_FOLDER }}/hyve-lite/latest
- name: Upload Tagged Version to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DOWNLOADS }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DOWNLOADS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DOWNLOADS_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
SOURCE_DIR: 'artifact' # optional: defaults to entire repository
DEST_DIR: ${{ secrets.S3_AWS_PRODUCTS_FOLDER }}/hyve-lite/$BUILD_VERSION
- name: Send update to the store
env:
PRODUCT_ID: ${{ secrets.THEMEISLE_ID }}
AUTH_TOKEN: ${{ secrets.THEMEISLE_STORE_AUTH }}
STORE_URL: ${{ secrets.THEMEISLE_STORE_URL }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
BUILD_VERSION: ${{ steps.get_version.outputs.VERSION }}
uses: Codeinwp/action-store-release@main
14 changes: 14 additions & 0 deletions .github/workflows/issue-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Issue Labeler"
on:
issues:
types: [opened]

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@master
with:
repo-token: "${{ secrets.BOT_TOKEN }}"
enable-versioned-regex: 0
configuration-path: .github/labeler.yml
Loading

0 comments on commit 8767d19

Please sign in to comment.