Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alavarello committed Dec 26, 2024
1 parent 33bc55f commit da30978
Show file tree
Hide file tree
Showing 4 changed files with 3,439 additions and 1,134 deletions.
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: Publish Package to npmjs
on:
release:
types: [published]

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version-file: '.nvmrc'

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Publish to npm
uses: changesets/action@v1
with:
publish: pnpm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
20 changes: 10 additions & 10 deletions deployments.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export const deployments = {
"11155111": {
"SciRegistry#SciRegistry": "0xaDD75Aecd98f0ADAD899729c88BfED4f8951c02A",
"PublicListVerifier#PublicListVerifier": "0xd58d48185146343720df2C26FcD8D3C3734e22cf",
"SciRegstrar#SciRegistrar": "0x83223D23E769CFE4b8bec8A32Eb148d0dbEc4dE5",
"ProxyModule#SCI": "0xC29e83AfEe01bDccA7f69fE1DfD7A61954dCE4d4",
"ProxyModule#TransparentUpgradeableProxy": "0x1694F779f28E3B3ff409d62c9d9d7042Ff406aEC",
"ProxyModule#ProxyAdmin": "0x9007eD4FFa791BB63662D6E894A97e163e4C2A23",
"SciModule#SCI": "0x1694F779f28E3B3ff409d62c9d9d7042Ff406aEC"
}
};
'11155111': {
'SciRegistry#SciRegistry': '0xaDD75Aecd98f0ADAD899729c88BfED4f8951c02A',
'PublicListVerifier#PublicListVerifier': '0xd58d48185146343720df2C26FcD8D3C3734e22cf',
'SciRegstrar#SciRegistrar': '0x83223D23E769CFE4b8bec8A32Eb148d0dbEc4dE5',
'ProxyModule#SCI': '0xC29e83AfEe01bDccA7f69fE1DfD7A61954dCE4d4',
'ProxyModule#TransparentUpgradeableProxy': '0x1694F779f28E3B3ff409d62c9d9d7042Ff406aEC',
'ProxyModule#ProxyAdmin': '0x9007eD4FFa791BB63662D6E894A97e163e4C2A23',
'SciModule#SCI': '0x1694F779f28E3B3ff409d62c9d9d7042Ff406aEC',
},
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"homepage": "https://sci.domains/",
"scripts": {
"prepublish": "corepack pnpm build; corepack pnpm lint; corepack pnpm test:cov; ",
"prepublish": "corepack pnpm prepare:publish; [[ -z $(git status --porcelain) ]] || exit 1",
"build": "corepack pnpm compile; tsc",
"compile": "hardhat compile",
"node": "hardhat node",
Expand All @@ -37,7 +37,7 @@
"save:deployments": "hardhat run scripts/build-deployment-address.ts",
"deploy:sepolia": "corepack pnpm run deploy --verify --network sepolia --parameters ignition/parameters/sepolia.json5",
"deploy:localhost": "corepack pnpm run deploy --network localhost --parameters ignition/parameters/sepolia.json5",
"prepare:package": "corepack pnpm clean; corepack pnpm build; corepack pnpm save:deployments"
"prepare:publish": "corepack pnpm clean; corepack pnpm build; corepack pnpm lint:fail; corepack pnpm test; corepack pnpm save:deployments"
},
"engines": {
"node": ">=20",
Expand Down
Loading

0 comments on commit da30978

Please sign in to comment.