diff --git a/.autod.conf.js b/.autod.conf.js deleted file mode 100644 index c5861d4..0000000 --- a/.autod.conf.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -module.exports = { - write: true, - prefix: '^', - test: [ - 'test', - ], - dep: [ - 'address', - 'formstream', - 'moment', - 'nounou', - 'p-map', - 'split2', - 'through2', - 'urllib', - 'uuid', - 'ws', - ], - devdep: [ - 'autod', - 'codecov', - 'eslint', - 'eslint-config-egg', - 'expect.js', - 'mocha', - 'nodemon', - 'nyc' - ], - exclude: [ - './scripts', - './test/fixtures', - './demo.js', - ], - semver: [ - 'eslint@6', - 'mocha@7' - ] -}; diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index d770f9a..c53fa72 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,23 +1,25 @@ name: Continuous integration on: push: - branches: [ '**' ] + branches: [ master ] pull_request: - branches: [ '**' ] + branches: [ master ] + merge_group: jobs: Runner: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ ubuntu-latest, macos-latest, windows-latest ] - node-version: [ 16, 18, 20, 22 ] + # use windows-2022, avoid error: 'wmic' is not recognized as an internal or external command + os: [ ubuntu-latest, macos-latest, windows-2022 ] + node-version: [ 16, 18, 20, 22, 24 ] steps: - name: Checkout Git Source uses: actions/checkout@master - name: Setup Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} @@ -26,8 +28,8 @@ jobs: - name: Continuous integration on win32 run: npm run test - if: ${{ matrix.os == 'windows-latest' }} + if: ${{ matrix.os == 'windows-2022' }} - name: Continuous integration on linux & darwin run: npm run ci - if: ${{ matrix.os != 'windows-latest' }} + if: ${{ matrix.os != 'windows-2022' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..42ec41d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Release +on: + push: + branches: [ master ] + +permissions: + contents: write + deployments: write + issues: write + pull-requests: write + id-token: write + +jobs: + release: + name: NPM + uses: X-Profiler/github-actions/.github/workflows/npm-release.yml@master + secrets: + GIT_TOKEN: ${{ secrets.GIT_TOKEN }} diff --git a/README.md b/README.md index bf51e7e..ebe07ee 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,10 @@ The agent that can collect or transfer xprofiler's performance logs. ## I. License -[BSD-2-Clause](LICENSE) \ No newline at end of file +[BSD-2-Clause](LICENSE) + +## Contributors + +[![Contributors](https://contrib.rocks/image?repo=X-Profiler/xtransit)](https://github.com/X-Profiler/xtransit/graphs/contributors) + +Made with [contributors-img](https://contrib.rocks). diff --git a/package.json b/package.json index c93c646..eac637d 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,7 @@ "test-single": "mocha -t 0 -R spec", "cov": "nyc --reporter=html --reporter=text --reporter=lcov mocha -R spec test/*.test.js --timeout 0", "cov-single": "nyc --reporter=html --reporter=text --reporter=lcov mocha --timeout 0 -R spec", - "ci": "npm run lint && npm run cov", - "release": "node scripts/release.js", - "autod": "autod" + "ci": "npm run lint && npm run cov" }, "repository": { "type": "git", @@ -54,7 +52,6 @@ "ws": "^8.18.0" }, "devDependencies": { - "autod": "^3.1.0", "eslint": "^8.57.1", "eslint-config-egg": "^14.0.0", "expect.js": "^0.3.1", diff --git a/scripts/release.js b/scripts/release.js deleted file mode 100644 index 828b445..0000000 --- a/scripts/release.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -const cp = require('node:child_process'); -const path = require('node:path'); -const pack = require('../package.json'); - -const releaseVersion = pack.version; -const releaseInfo = `${pack.name}@${releaseVersion}`; -console.log(`will release ${releaseInfo}...\n`); - -function run(cmd) { - console.log(`Run: ${cmd}`); - const options = { cwd: path.join(__dirname, '..'), maxBuffer: 4 * 1024 * 1024, stdio: 'inherit' }; - cp.execSync(cmd, options); -} - -// release tag -const tagName = `v${releaseVersion}`; -// run(`git tag -d ${tagName}`); -run(`git tag ${tagName}`); -run(`git push -f origin ${tagName}`); - -// publish to npm -run('npm publish --registry=https://registry.npmjs.org'); - -console.log(`\nrelease ${releaseInfo} done.`);