Skip to content

Commit

Permalink
Bump version and fix the publish workflow (#26)
Browse files Browse the repository at this point in the history
* Add publish worklfow

* Remove release workflow

* Bump package version
  • Loading branch information
nazarhussain authored Nov 26, 2024
1 parent 392ad33 commit f281a16
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 95 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Package to npmjs
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: "The version to release. The version should be the same as version in package.json. For example, 1.0.0"
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event_name == 'workflow_dispatch'
with:
fetch-tags: true
ref: ${{ inputs.version }}

- uses: actions/checkout@v4
if: github.event_name != 'workflow_dispatch'

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
94 changes: 0 additions & 94 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dapplion/benchmark",
"version": "0.2.4",
"version": "0.2.5",
"main": "lib/index.js",
"repository": "[email protected]:dapplion/benchmark.git",
"author": "dapplion <[email protected]>",
Expand Down

0 comments on commit f281a16

Please sign in to comment.