-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eaf0172
commit 52edf30
Showing
14 changed files
with
171 additions
and
49 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,31 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
||
name: Node.js CI | ||
|
||
on: | ||
push: | ||
branches: [ "develop" ] | ||
pull_request: | ||
branches: [ "develop" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm install --force | ||
- run: npm run build | ||
- run: npm run ci:test |
This file contains 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,82 @@ | ||
name: Publish | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
pull_request_review: | ||
types: | ||
- submitted | ||
check_suite: | ||
types: | ||
- completed | ||
status: {} | ||
|
||
jobs: | ||
autoApprove: | ||
if: startsWith(github.head_ref, 'release-auto-') | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- uses: hmarr/auto-approve-action@v4 | ||
with: | ||
review-message: 'Auto approve sync PRs to auto merge them' | ||
publish: | ||
if: startsWith(github.head_ref, 'release-auto-') | ||
needs: [autoApprove] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18 | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install dependencies | ||
run: npm ci --force | ||
- name: Publish | ||
if: startsWith(github.head_ref, 'release-auto-v') | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
npm run pub | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Publish-next | ||
if: startsWith(github.head_ref, 'release-auto-next-v') | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
npm run pub-next | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Read package.json | ||
id: read-version | ||
uses: notiz-dev/github-action-json-property@release | ||
with: | ||
path: 'package.json' | ||
prop_path: 'version' | ||
- name: send message to webhook | ||
uses: joelwmale/webhook-action@master | ||
with: | ||
url: 'https://hook-rc.pingcode.com/api/flow/w/http/357bdd4f00f34bfab2f878ad3b9e8b48' | ||
body: '{ "version": "${{ steps.read-version.outputs.prop }}", "name": "ai-table" }' | ||
autoMerge: | ||
if: startsWith(github.head_ref, 'release-auto-') | ||
needs: [publish] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: autoMerge | ||
name: autoMerge | ||
uses: 'pascalgn/[email protected]' | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
MERGE_LABELS: '' | ||
MERGE_FORKS: 'false' | ||
MERGE_RETRIES: '20' | ||
MERGE_RETRY_SLEEP: '60000' |
This file contains 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,16 @@ | ||
module.exports = { | ||
allowBranch: ['main', 'release-auto-*'], | ||
bumpFiles: ['package.json', 'package-lock.json', 'packages/grid/package.json'], | ||
skip: { | ||
confirm: true | ||
}, | ||
// backward compatibility changelog | ||
// because we didn't use tag prefix(v) when create tag before | ||
// should set tagPrefix as empty (default is 'v') | ||
// otherwise, the changelog will rebuild, and will be lost past versions | ||
tagPrefix: '', | ||
hooks: { | ||
prepublish: 'npm run build', | ||
prereleaseBranch: 'node ./scripts/pre-release.js {{version}}' | ||
} | ||
}; |
Empty file.
This file contains 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
This file contains 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
This file contains 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,9 @@ | ||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files | ||
|
||
import 'zone.js'; | ||
import 'zone.js/testing'; | ||
import { getTestBed } from '@angular/core/testing'; | ||
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; | ||
|
||
// First, initialize the Angular testing environment. | ||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { teardown: { destroyAfterEach: true } }); |
This file contains 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,19 @@ | ||
const chalk = require('chalk'); | ||
|
||
const command = process.env.npm_lifecycle_event; | ||
const args = process.argv; | ||
const version = args[2]; | ||
|
||
if (version.includes('next') && !command.includes('next')) { | ||
console.log( | ||
chalk.bgRed.black('[ERROR]'), | ||
chalk.red(`✘ Publish the next version, please use ${chalk.blue('npm run release-next')}`), | ||
); | ||
process.exit(1); | ||
} else if (!version.includes('next') && command.includes('next')) { | ||
console.log( | ||
chalk.bgRed.black('[ERROR]'), | ||
chalk.red(`✘ Publish the latest version, please use ${chalk.blue('npm run release')}`), | ||
); | ||
process.exit(1); | ||
} |