diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml new file mode 100644 index 0000000..a5706ed --- /dev/null +++ b/.github/workflows/npm.yml @@ -0,0 +1,36 @@ +name: NPM + +on: + push: + branches: + - main + paths: + - "contracts/**" + - "package.json" + - "yarn.lock" + workflow_dispatch: + +jobs: + npm-compile-publish-contracts: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-node@v2 + with: + node-version: "14.x" + cache: "yarn" + registry-url: "https://registry.npmjs.org" + + - name: Bump up package version + id: npm-version-bump + uses: keep-network/npm-version-bump@v2 + with: + environment: pre + branch: ${{ github.ref }} + commit: ${{ github.sha }} + + - name: Publish package + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm publish --access public --tag pre diff --git a/package.json b/package.json index b9a4849..5fbbd3a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,18 @@ { - "name": "@thesis/solidity-contracts", - "version": "0.0.1", + "name": "@thesis-co/solidity-contracts", + "version": "0.0.1-pre", "license": "MIT", + "files": [ + "contracts/**/*.sol" + ], + "repository": { + "type": "git", + "url": "ssh://git@github.com/thesis/solidity-contracts" + }, + "bugs": { + "url": "https://github.com/thesis/solidity-contracts/issues" + }, + "homepage": "https://github.com/thesis/solidity-contracts", "scripts": { "build": "hardhat compile", "format": "npm run lint && prettier --check .",