From a3622151572bf92a8eac65a3982a419d241b92c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CTamara?= <“tamara@alumni.sabanciuniv.edu”> Date: Wed, 21 Feb 2024 12:19:41 +0300 Subject: [PATCH 1/2] Add npm publish automation yaml --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + README.md | 2 +- package-lock.json | 18 ++++++++++++++++-- package.json | 12 ++++++------ 5 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..728729c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: "New Version Actions" + +on: + push: + branches: # only trigger when a commit was pushed to main + - master + +permissions: + contents: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Setup repo + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.0.0 + + - id: publish-to-npm + uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} # This token should be added from repo settings + + - id: create-gh-release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ steps.publish-to-npm.outputs.version }} + release_name: ${{ steps.publish-to-npm.outputs.version }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 824a143..a7f044b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ build/Release # Dependency directories node_modules jspm_packages +package-lock.json # Optional npm cache directory .npm diff --git a/README.md b/README.md index 619ec78..a0f5314 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # @hipo/eslint-config-typescript -Hipo's shareable ESLint configurations for TypeScript. +Bakers' shareable ESLint configurations for TypeScript. ## Installation diff --git a/package-lock.json b/package-lock.json index 0841c5e..26d860a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,19 @@ { "name": "@hipo/eslint-config-typescript", - "version": "1.0.1", - "lockfileVersion": 1 + "version": "1.2.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@hipo/eslint-config-typescript", + "version": "1.2.1", + "license": "UNLICENSED", + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.9.1", + "@typescript-eslint/parser": "^5.9.1", + "eslint-import-resolver-typescript": "^2.4.0", + "eslint-plugin-import": "^2.23.4" + } + } + } } diff --git a/package.json b/package.json index ba9348a..ebd1a4c 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "@hipo/eslint-config-typescript", - "version": "1.2.0", - "description": "Hipo's shareable ESLint configurations for TypeScript", + "version": "1.2.1", + "description": "Bakers' shareable ESLint configurations for TypeScript", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", - "url": "git+https://github.com/Hipo/eslint-config-hipo-typescript.git" + "url": "git+https://github.com/studiobakers/eslint-config-typescript" }, "keywords": [ "eslintconfig", @@ -16,12 +16,12 @@ "typescript", "hipo" ], - "author": "Hipo Web Team", + "author": "Bakers Web Team", "license": "UNLICENSED", "bugs": { - "url": "https://github.com/Hipo/eslint-config-hipo-typescript/issues" + "url": "https://github.com/studiobakers/eslint-config-typescript/issues" }, - "homepage": "https://github.com/Hipo/eslint-config-hipo-typescript#readme", + "homepage": "https://github.com/studiobakers/eslint-config-typescript/blob/main/README.md", "peerDependencies": { "@typescript-eslint/eslint-plugin": "^5.9.1", "@typescript-eslint/parser": "^5.9.1", From bf25e1db16a1f1cc01eb4a75cc2fc9b12a4ab6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CTamara?= <“tamara@alumni.sabanciuniv.edu”> Date: Wed, 21 Feb 2024 12:20:33 +0300 Subject: [PATCH 2/2] fix: change branch name in yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 728729c..679cb8f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: "New Version Actions" on: push: branches: # only trigger when a commit was pushed to main - - master + - main permissions: contents: write