Skip to content

Commit

Permalink
Merge pull request #156 from zama-ai/workflowContracts
Browse files Browse the repository at this point in the history
feat: include workflows for core contracts
  • Loading branch information
jatZama authored Dec 2, 2024
2 parents 151ebe9 + 67c95a7 commit d45d3d8
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/fhevm-core-contracts-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish fhEVM Solidity core contracts release

on:
release:
types: [released]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: "write"
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.x
- run: cd contracts
- run: .env.example .env
- run: npm ci --include=optional
- run: npm run compile
- uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
with:
token: ${{ secrets.NPM_TOKEN }}
provenance: true
25 changes: 25 additions & 0 deletions .github/workflows/fhevm-core-contracts-publishprerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish fhEVM Solidity core contracts prerelease

on:
release:
types: [prereleased]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: "write"
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.x
- run: cd contracts
- run: cp .env.example .env
- run: npm ci --include=optional
- run: npm run compile
- uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
with:
tag: prerelease
token: ${{ secrets.NPM_TOKEN }}
provenance: true
19 changes: 19 additions & 0 deletions contracts/package-lock.json

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

2 changes: 2 additions & 0 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "fhEVM contracts",
"main": "index.js",
"scripts": {
"compile": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat compile",
"lint": "npm run lint:sol && npm run lint:ts && npm run prettier:check",
"lint:ts": "eslint --ignore-path ./.eslintignore --ext .js,.ts .",
"prettier:check": "prettier --check \"**/*.{js,json,md,sol,ts,yml}\"",
Expand All @@ -24,6 +25,7 @@
"@openzeppelin/hardhat-upgrades": "^3.3.0",
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
"bigint-buffer": "^1.1.5",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
Expand Down

0 comments on commit d45d3d8

Please sign in to comment.