Skip to content

Commit fef0ae7

Browse files
authored
feat(publish): finish logic for v1.0.0 publish (#2)
1 parent 583a235 commit fef0ae7

File tree

4 files changed

+75
-2
lines changed

4 files changed

+75
-2
lines changed

.github/workflows/pre-release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Pre-Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*beta*'
7+
8+
jobs:
9+
pre-release:
10+
name: 'Pre Release'
11+
runs-on: 'ubuntu-latest'
12+
permissions:
13+
contents: write
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-node@v3
18+
with:
19+
node-version: 16.13.0
20+
registry-url: 'https://registry.npmjs.org'
21+
- run: yarn install
22+
- run: yarn build
23+
- uses: 'marvinpinto/action-automatic-releases@latest'
24+
with:
25+
repo_token: '${{ secrets.GITHUB_TOKEN }}'
26+
prerelease: true
27+
files: LICENSE
28+
- run: yarn publish --access public --tag beta
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
- '!v*beta*'
8+
9+
jobs:
10+
release:
11+
name: 'Release'
12+
runs-on: 'ubuntu-latest'
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: 16.13.0
21+
registry-url: 'https://registry.npmjs.org'
22+
- run: yarn install
23+
- run: yarn build
24+
- uses: 'marvinpinto/action-automatic-releases@latest'
25+
with:
26+
repo_token: '${{ secrets.GITHUB_TOKEN }}'
27+
prerelease: false
28+
files: LICENSE
29+
- run: yarn publish --access public
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
"name": "@nftgo/gorarity",
33
"version": "1.0.0",
44
"description": "An algorithm to calculate rarity of NFT(how special it is), based on Jaccard Distance.",
5+
"keywords": [
6+
"rarity",
7+
"nft",
8+
"web3",
9+
"nonfungibletoken",
10+
"crypto",
11+
"algorithm",
12+
"nftgo",
13+
"nodejs",
14+
"javascript"
15+
],
516
"exports": {
617
".": {
718
"import": "./dist/mjs/index.js",
@@ -10,6 +21,9 @@
1021
},
1122
"main": "./dist/cjs/index.js",
1223
"module": "./dist/mjs/index.js",
24+
"files": [
25+
"dist"
26+
],
1327
"scripts": {
1428
"prepare": "husky install",
1529
"lint": "eslint ./ --max-warnings=0 --ext .ts",
@@ -25,7 +39,6 @@
2539
"type": "git",
2640
"url": "git+https://github.com/NFTGo/GoRarity.git"
2741
},
28-
"keywords": [],
2942
"author": "NFTGo.io",
3043
"license": "MIT",
3144
"bugs": {

tsconfig-base.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"esModuleInterop": true,
88
"moduleResolution": "node",
99
"resolveJsonModule": true,
10-
"composite": true,
1110
"rootDir": "src",
1211
"types": ["node", "jest"],
1312
"lib": ["ESNext"]

0 commit comments

Comments
 (0)