From 23fe4176739bee55905bd7283c524dee5ce8c428 Mon Sep 17 00:00:00 2001 From: gokhangunduz Date: Tue, 30 Jul 2024 01:25:06 +0300 Subject: [PATCH] feat(version) :bookmark: release 0.0.20 version --- .github/workflows/npm-publish.yml | 63 +++++++++++++++++++++---------- package.json | 2 +- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index bb50ee8..60fbb96 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,46 +1,69 @@ -name: Node.js Package +name: Publish Package on: push: tags: - - "*.*.*" + - "v*.*.*" jobs: build: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 with: node-version: latest - - run: npm install - - run: npm run build + + - name: Install dependencies + run: npm install + + - name: Build project + run: npm run build publish-npm: - needs: build runs-on: ubuntu-latest + needs: build + steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 with: node-version: latest - registry-url: https://registry.npmjs.org/ - - run: npm publish + + - name: Set npm package name + run: | + jq '.name = "hookstorm"' package.json > temp.json && mv temp.json package.json + + - name: Publish npm package + run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - publish-gpr: - needs: build + publish-github: runs-on: ubuntu-latest - permissions: - contents: read - packages: write + needs: build + steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 with: node-version: latest - registry-url: https://npm.pkg.github.com/ - - run: npm publish + + - name: Set GitHub package name + run: | + jq '.name = "@gokhangunduz/hookstorm"' package.json > temp.json && mv temp.json package.json + + - name: Publish GitHub package + run: npm publish --registry=https://npm.pkg.github.com/ env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index cc344b9..c67d424 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hookstorm", - "version": "0.0.19", + "version": "0.0.20", "description": "hookstorm", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js",