v0.1.0 #21
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |