Skip to content

Commit

Permalink
feat(publish): finish logic for v1.0.0 publish (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmokel authored Feb 23, 2023
1 parent 583a235 commit fef0ae7
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pre-Release

on:
push:
tags:
- 'v*beta*'

jobs:
pre-release:
name: 'Pre Release'
runs-on: 'ubuntu-latest'
permissions:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.13.0
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
prerelease: true
files: LICENSE
- run: yarn publish --access public --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
push:
tags:
- 'v*'
- '!v*beta*'

jobs:
release:
name: 'Release'
runs-on: 'ubuntu-latest'
permissions:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.13.0
registry-url: 'https://registry.npmjs.org'
- run: yarn install
- run: yarn build
- uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
prerelease: false
files: LICENSE
- run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
"name": "@nftgo/gorarity",
"version": "1.0.0",
"description": "An algorithm to calculate rarity of NFT(how special it is), based on Jaccard Distance.",
"keywords": [
"rarity",
"nft",
"web3",
"nonfungibletoken",
"crypto",
"algorithm",
"nftgo",
"nodejs",
"javascript"
],
"exports": {
".": {
"import": "./dist/mjs/index.js",
Expand All @@ -10,6 +21,9 @@
},
"main": "./dist/cjs/index.js",
"module": "./dist/mjs/index.js",
"files": [
"dist"
],
"scripts": {
"prepare": "husky install",
"lint": "eslint ./ --max-warnings=0 --ext .ts",
Expand All @@ -25,7 +39,6 @@
"type": "git",
"url": "git+https://github.com/NFTGo/GoRarity.git"
},
"keywords": [],
"author": "NFTGo.io",
"license": "MIT",
"bugs": {
Expand Down
1 change: 0 additions & 1 deletion tsconfig-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"esModuleInterop": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"composite": true,
"rootDir": "src",
"types": ["node", "jest"],
"lib": ["ESNext"]
Expand Down

0 comments on commit fef0ae7

Please sign in to comment.