Skip to content

Commit

Permalink
Merge pull request #20 from etherisc/feature/npm-dist
Browse files Browse the repository at this point in the history
Feature/npm dist
  • Loading branch information
doerfli committed Sep 22, 2022
2 parents 3b0002a + e80ee7f commit 853f96f
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 20 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:

jobs:
compile:
name: Compile contracts
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -58,3 +59,28 @@ jobs:

- name: Run solhint linter
run: solhint contracts/**/*.sol


publish:
name: Publish package to npmjs
runs-on: ubuntu-latest
if: ${{ contains(join(needs.*.result, ','), 'success') }}
needs: [compile]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node environment
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'

- run: npm ci

- name: Set build version identifier
run: npm version "`npm version patch --no-git-tag-version`-`git rev-parse --short HEAD`" --no-git-tag-version

- run: npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ __pycache__
build/
reports/
/node_modules/
etherisc*.tgz
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,12 @@ and including _prettier_ formatting
```bash
solhint --config .solhint.prettier.json contracts/**/*.sol
```

## Publish release to NPMJS

```bash
npm ci
npm version patch/minor/major --no-git-tag-version
npm publish
git commit -m 'bump version'
```
26 changes: 11 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 16 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
{
"name": "@etherisc/gif-interface",
"version": "v1.7.0-staging-b",
"version": "2.0.0-rc.1",
"description": "This repository holds the necessary interfaces and base contracts to interact with an existing GIF instance. The repository is not intended to be used on its own.",
"repository": {
"type": "git",
"url": "git+https://github.com/etherisc/gif-interface.git"
},
"files": [
"contracts/*"
"contracts/**/*sol"
],
"keywords": [
"etherisc",
"dip",
"gif",
"insurance",
"blockchain",
"ethereum",
"solidity"
],
"keywords": [],
"license": "Apache-2.0",
"homepage": "https://github.com/etherisc/gif-interface#readme",
"homepage": "https://www.etherisc.com",
"bugs": {
"url": "https://github.com/etherisc/gif-interface/issues"
},
"dependencies": {
"openzeppelin-solidity": "^4.6.0"
"@openzeppelin/contracts": "4.7.3"
}
}

0 comments on commit 853f96f

Please sign in to comment.