-
Notifications
You must be signed in to change notification settings - Fork 9
55 lines (50 loc) · 1.88 KB
/
Copy pathpublish-errors.yml
File metadata and controls
55 lines (50 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Publish CoFHE Errors to NPM
on:
release:
types: [published]
workflow_dispatch:
push: # Temporary for testing
branches:
- feat/error-identifier-script
jobs:
publish-errors:
runs-on: ubuntu-latest
name: Extract and Publish Errors
permissions:
contents: read
id-token: write # Required for NPM provenance
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
working-directory: contracts/internal/host-chain
run: npm install
- name: Extract errors and publish to NPM
uses: roeezolantz/solidity-error-identifier-action@master
env:
KEY: '0x0000000000000000000000000000000000000000000000000000000000000001'
KEY2: '0x0000000000000000000000000000000000000000000000000000000000000002'
AGGREGATOR_KEY: '0x0000000000000000000000000000000000000000000000000000000000000003'
with:
mode: 'compile'
contract_paths: 'contracts'
compiler: 'hardhat'
working_directory: 'contracts/internal/host-chain'
output_path: 'cofhe-errors.json'
publish_npm: 'true'
npm_package_name: '@fhenixprotocol/cofhe-errors'
npm_binary_name: 'cofhe-errors'
package_description: 'Error definitions and identifiers for CoFHE smart contracts'
package_keywords: 'cofhe, fhe, homomorphic-encryption, errors, solidity, smart-contracts, fhenix'
npm_token: ${{ secrets.NPM_TOKEN }}
npm_provenance: 'true'
- name: Upload errors file
run: ls -la cofhe-errors.json # Verify file exists in root
- name: Upload errors database
uses: actions/upload-artifact@v4
with:
name: cofhe-errors
path: cofhe-errors.json