Skip to content
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

Internal: Update build and create NPM package [ED-7724] #70

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
css
20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
extends: [
'plugin:@wordpress/eslint-plugin/recommended-with-formatting',
],
plugins: [],
globals: {
},
parserOptions: {
ecmaVersion: 2017,
requireConfigFile: false,
sourceType: 'module',
},
rules: {
},
settings: {
jsdoc: {
mode: 'typescript',
},
},
};
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build

on:
pull_request:
push:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: https://npm.pkg.github.com/
scope: ${{ github.repository_owner }}
- run: npm install
- run: npm ci
- run: npm version ${{ github.event.release.tag_name }} --no-git-tag-version
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
pull_request:
types: [ closed ]

jobs:
release:
if: github.event.pull_request.merged == true && github.base_ref == 'master' && !contains(github.event.pull_request.labels.*.name, 'skip release')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Latest Tag
run: echo "LATEST_TAG=$(git tag '--sort=version:refname'| tail -1 | awk '{ print } END { if (!NR) print "0.0.0" }')" >> $GITHUB_ENV
- name: Increment Tag
uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ env.LATEST_TAG }}
level: patch
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.CLOUD_DEVOPS_TOKEN }}
with:
tag_name: ${{ steps.bump-semver.outputs.new_version }}
release_name: "${{ steps.bump-semver.outputs.new_version }}: ${{ github.event.pull_request.title }}"
draft: false
prerelease: false
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ composer.lock
Thumbs.db
yarn.lock

# Generated code
css
eicons.json

*.log
*.map
124 changes: 0 additions & 124 deletions Gruntfile.js

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Elementor Icons ###

Repo for [Elementor](https://github.com/pojome/elementor) Icons
Repo for [Elementor](https://github.com/elementor/elementor) Icons

See it in action: [Icons Demo](https://elementor.github.io/elementor-icons/)

Expand Down
Loading