Skip to content

Commit

Permalink
feat(version) 🔖 release 0.0.20 version
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhangunduz committed Jul 29, 2024
1 parent fe28c0c commit 23fe417
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 21 deletions.
63 changes: 43 additions & 20 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 23fe417

Please sign in to comment.