Skip to content

Commit

Permalink
Merge pull request #2 from bigbinary/scroll-sync-fix-for-multi-groups
Browse files Browse the repository at this point in the history
Fixed scroll sync for multiple groups
  • Loading branch information
udai1931 authored Nov 11, 2024
2 parents 401c947 + 73cd816 commit 52e4e87
Show file tree
Hide file tree
Showing 9 changed files with 11,906 additions and 15,945 deletions.
3 changes: 1 addition & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"presets": ["es2015", "react", "stage-1"],
"plugins": ["add-module-exports"]
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
101 changes: 101 additions & 0 deletions .github/workflows/create_and_publish_releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: "Create and publish releases"
on:
pull_request:
branches:
- main
types: [closed]
jobs:
release:
name: "Create Release"
runs-on: ubuntu-latest
if: >-
${{ github.event.pull_request.merged == true && (
contains(github.event.pull_request.labels.*.name, 'patch') ||
contains(github.event.pull_request.labels.*.name, 'minor') ||
contains(github.event.pull_request.labels.*.name, 'major') ) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
token: ${{secrets.GITHUB_TOKEN}}
persist-credentials: true

- name: Setup git user
run: |
git config user.name "Amal dinesh"
git config user.email "amalkdinesh@gmail.com"
- name: Setup NodeJS LTS version
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516
with:
node-version-file: '.nvmrc'

- name: Setup the project
run: yarn install

- name: Generate production build
run: yarn bundle

- name: Prefix version tag with "v"
run: yarn config set version-tag-prefix "v"

- name: Disable Git commit hooks
run: git config core.hooksPath /dev/null

- name: Bump the patch version and create git tag on release
if: ${{ contains(github.event.pull_request.labels.*.name, 'patch') }}
run: yarn version --patch --no-git-tag-version

- name: Bump the minor version and create git tag on release
if: ${{ contains(github.event.pull_request.labels.*.name, 'minor') }}
run: yarn version --minor --no-git-tag-version

- name: Bump the major version and create git tag on release
if: ${{ contains(github.event.pull_request.labels.*.name, 'major') }}
run: yarn version --major --no-git-tag-version

- name: Get the package version from package.json
uses: tyankatsu0105/read-package-version-actions@5aad2bb630a577ee4255546eb3ee0593df68f6ca
id: package-version

- name: Read pull request body
uses: 8BitJonny/gh-get-current-pr@2.0.0
id: PR
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ github.event.pull_request.head.sha }}

- name: Extract changelog
id: CHANGELOG
run: |
content=$(echo '${{ steps.PR.outputs.pr_body }}' | python3 -c 'import json; import sys; print(json.dumps(sys.stdin.read().partition("**Description**")[2].partition("**Checklist**")[0].strip()))')
echo "CHANGELOG=${content}" >> $GITHUB_ENV
shell: bash

- name: Update Changelog
continue-on-error: true
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ steps.package-version.outputs.version }}
release-notes: ${{ fromJson(env.CHANGELOG) }}

- name: Commit and Push changes
uses: EndBug/add-and-commit@v7
with:
branch: main
message: "New version release"

- name: Create a release draft on release
uses: release-drafter/release-drafter@ac463ffd9cc4c6ad5682af93dc3e3591c4657ee3
if: ${{contains(github.event.pull_request.labels.*.name, 'release')}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: v${{ steps.package-version.outputs.version }}
publish: true

- name: Publish the package on NPM
uses: JS-DevTools/npm-publish@22595ff8c4d0d9f53cef0656fbb90fbe06ee885c
with:
access: "public"
token: ${{ secrets.NPM_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish to npm

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Setup NodeJS LTS version
uses: actions/setup-node@v3
with:
node-version: "18.12.0"

- name: Setup the project
run: yarn install

- name: Generate production build
run: yarn bundle

- name: Publish the package on NPM
uses: JS-DevTools/npm-publish@v1
with:
access: "public"
token: ${{ secrets.NPM_TOKEN }}
tag: ${{ github.event.release.prerelease && 'beta' || 'latest' }}
23 changes: 0 additions & 23 deletions .github/workflows/release.yml

This file was deleted.

32 changes: 32 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const reactPlugin = require("eslint-plugin-react");
const babelParser = require("@babel/eslint-parser");

module.exports = [
{
files: ["src/**/*.{js,jsx}"], // Targets .js and .jsx files within the src folder
ignores: ["node_modules/**"], // Ignores node_modules
languageOptions: {
parser: babelParser, // Use babel-eslint parser directly here
parserOptions: {
ecmaVersion: "latest", // Use latest ECMAScript features
sourceType: "module", // Use ES modules
ecmaFeatures: {
jsx: true, // Enable JSX parsing
},
},
},
plugins: {
react: reactPlugin,
},
rules: {
"no-unused-vars": "warn",
"no-console": "warn",
"react/prop-types": "off",
},
settings: {
react: {
version: "detect", // Auto-detects React version
},
},
},
];
Loading

0 comments on commit 52e4e87

Please sign in to comment.