diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..0f59d90 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,21 @@ +name: Node.js Package +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '12.x' + registry-url: 'https://registry.npmjs.org' + - run: yarn + - name: Build + run: yarn build + - name: Version + run: yarn version --new-version "${GITHUB_REF:11}" --no-git-tag-version + - run: yarn pub + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/package.json b/package.json index c790c30..b093670 100644 --- a/package.json +++ b/package.json @@ -1,51 +1,48 @@ { - "name": "scyllo", - "version": "0.9.3", - "description": "The Cassandra/Scylla library you didn't want but got anyways.", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/lvkdotsh/scyllo.git" - }, - "author": "Lucemans ", - "files": [ - "lib" - ], - "keywords": [ - "cassandra", - "scylla", - "scyllo", - "database", - "client" - ], - "license": "MIT", - "devDependencies": { - "@types/jest": "^27.0.2", - "@typescript-eslint/parser": "^5.2.0", - "chalk": "^4.1.2", - "eslint": "^8.1.0", - "eslint-plugin-jest": "^25.2.2", - "eslint-plugin-radar": "^0.2.1", - "eslint-plugin-simple-import-sort": "^7.0.0", - "eslint-plugin-unicorn": "^37.0.1", - "jest": "^27.2.5", - "jest-nyancat-reporter": "^2.0.0", - "ts-jest": "^27.0.5", - "tslint": "^6.1.3", - "typescript": "^4.4.3", - "typescript-eslint": "^0.0.1-alpha.0" - }, - "scripts": { - "test": "jest", - "build": "tsc", - "lint": "eslint -c .eslintrc.json --ext .ts ./src", - "prepublishOnly": "yarn lint", - "preversion": "yarn lint && yarn build", - "version": "git add -A src", - "postversion": "git push && git push --tags" - }, - "dependencies": { - "cassandra-driver": "^4.6.3" - } + "name": "scyllo", + "version": "0.9.3", + "description": "The Cassandra/Scylla library you didn't want but got anyways.", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/lvkdotsh/scyllo.git" + }, + "author": "Lucemans ", + "files": [ + "lib" + ], + "keywords": [ + "cassandra", + "scylla", + "scyllo", + "database", + "client" + ], + "license": "MIT", + "devDependencies": { + "@types/jest": "^27.0.2", + "@typescript-eslint/parser": "^5.2.0", + "chalk": "^4.1.2", + "eslint": "^8.1.0", + "eslint-plugin-jest": "^25.2.2", + "eslint-plugin-radar": "^0.2.1", + "eslint-plugin-simple-import-sort": "^7.0.0", + "eslint-plugin-unicorn": "^37.0.1", + "jest": "^27.2.5", + "jest-nyancat-reporter": "^2.0.0", + "ts-jest": "^27.0.5", + "tslint": "^6.1.3", + "typescript": "^4.4.3", + "typescript-eslint": "^0.0.1-alpha.0" + }, + "scripts": { + "test": "jest", + "build": "tsc", + "lint": "eslint -c .eslintrc.json --ext .ts ./src", + "pub": "yarn build && yarn publish --access public" + }, + "dependencies": { + "cassandra-driver": "^4.6.3" + } }