From 27e2f840130cb45766b0f7c41cf338369f43a3d8 Mon Sep 17 00:00:00 2001 From: "Dirim, Berkan" Date: Mon, 20 May 2024 17:21:07 +0200 Subject: [PATCH] Update publish scripts --- .github/workflows/npm-publish.yml | 35 +++++++++++++------------------ package.json | 7 +++++-- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 5793ef2..ded2f5c 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,6 +1,3 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - name: Node.js Package on: @@ -8,26 +5,24 @@ on: types: [created] jobs: - build: + build-and-publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 20 - - run: npm ci + - name: Checkout repository + uses: actions/checkout@v4 - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 with: node-version: 20 - registry-url: https://registry.npmjs.org/ - - env: + - name: Install dependencies + run: npm ci + + - name: Build project + run: npm run build + + - name: Publish to npm + env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - run: | - npm ci - bash .ci/publish.sh + run: bash .ci/publish.sh + \ No newline at end of file diff --git a/package.json b/package.json index 4179942..145db0d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,10 @@ "name": "htmplar", "description": "Developer friendly email development with React", "version": "0.4.0", - "repository": "https://github.com/adidas/htmplar.git", + "repository": { + "type": "git", + "url": "git+https://github.com/adidas/htmplar.git" + }, "author": "Bilal Çınarlı ", "contributers": [ "Berkan Dirim " @@ -18,7 +21,7 @@ }, "preferGlobal": true, "bin": { - "htmplar": "./src/cli/index.js" + "htmplar": "src/cli/index.js" }, "publishConfig": { "access": "public"