Skip to content

Commit

Permalink
NPM Package release workflow (#173)
Browse files Browse the repository at this point in the history
* feat: Merge contract workflows together

* fix: Bump up version 0.3.2 -> 0.3.3

* fix: Missing `on` statement

* fix: Remove an extra settings from pipeline

* chore: Update README to trigger pipeline
  • Loading branch information
martinkersner authored Jan 23, 2023
1 parent 9fd99cf commit 002a94d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: "contracts: build & publish"
name: "contracts: test & build & publish"
on:
push:
paths:
- "contracts/**"
# release:
# types: [created]
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,11 +15,17 @@ jobs:
always-auth: true
- run: yarn
working-directory: ./contracts
- run: yarn solhint
working-directory: ./contracts
- run: yarn eslint
working-directory: ./contracts
- run: npx hardhat test
working-directory: ./contracts
- run: yarn compile
working-directory: ./contracts
- run: yarn build
working-directory: ./contracts
- run: yarn publish
- run: yarn publish --new-version ${{ github.event.release.tag_name }}
working-directory: ./contracts
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
20 changes: 0 additions & 20 deletions .github/workflows/contracts.solhint+eslint.yaml

This file was deleted.

9 changes: 8 additions & 1 deletion .github/workflows/contracts.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "18.12"
registry-url: "https://npm.pkg.github.com"
- run: yarn
working-directory: ./contracts
- run: yarn solhint
working-directory: ./contracts
- run: yarn eslint
working-directory: ./contracts
- run: npx hardhat test
working-directory: ./contracts
- run: yarn compile
working-directory: ./contracts
- run: yarn build
working-directory: ./contracts
10 changes: 8 additions & 2 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@

## Installation

```
```shell
yarn install
```

## Compilation

```
```shell
yarn compile
```

## Package

```shell
yarn build
```

## Deployment

Deployment scripts are stored in [`deploy`](deploy) directory.
Expand Down
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bisonai-cic/icn-contracts",
"version": "0.3.2",
"version": "0.3.3",
"description": "",
"files": [
"./dist",
Expand Down

0 comments on commit 002a94d

Please sign in to comment.