diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 809440d..c7cea0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,7 @@ name: CI on: - push: pull_request: - schedule: - - cron: '0 0 * * 0' permissions: contents: read @@ -12,12 +9,13 @@ permissions: jobs: test-node: runs-on: ubuntu-latest + timeout-minutes: 5 strategy: matrix: node-version: - - 14 - - 20 + - 18 + - 24 services: redis: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..7815cae --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Publish Package +run-name: publish @taskworld/socket.io-redis-adapter + +on: + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://npm.pkg.github.com + + - run: npm ci + + - run: npm run compile + + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package-lock.json b/package-lock.json index c805f93..8ee13c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@socket.io/redis-adapter", + "name": "@taskworld/socket.io-redis-adapter", "version": "8.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@socket.io/redis-adapter", + "name": "@taskworld/socket.io-redis-adapter", "version": "8.3.1", "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 389cd22..8e36d72 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "types": "./dist/index.d.ts", "scripts": { "compile": "rimraf ./dist && tsc", - "test": "npm run format:check && tsc && nyc mocha --bail --require ts-node/register test/test-runner.ts", + "test": "npm run format:check && tsc && nyc mocha --bail --exit --require ts-node/register test/test-runner.ts", "format:check": "prettier --parser typescript --check 'lib/**/*.ts' 'test/**/*.ts'", "format:fix": "prettier --parser typescript --write 'lib/**/*.ts' 'test/**/*.ts'", "prepack": "npm run compile"