-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into jcortejoso/test-blockchain-1.8.x-branch
- Loading branch information
Showing
146 changed files
with
8,488 additions
and
10,884 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Publish ABIs and Solidity files to NPM | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
release: | ||
types: [released] | ||
workflow_dispatch: | ||
inputs: | ||
npm_version: | ||
description: 'NPM version' | ||
required: true | ||
type: string | ||
jobs: | ||
publish: | ||
runs-on: ['self-hosted', 'org', 'npm-publish'] | ||
permissions: | ||
contents: write | ||
id-token: write | ||
pull-requests: write | ||
repository-projects: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Akeyless Get Secrets | ||
id: get_auth_token | ||
uses: docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest | ||
with: | ||
api-url: https://api.gateway.akeyless.celo-networks-dev.org | ||
access-id: p-kf9vjzruht6l | ||
static-secrets: '{"/static-secrets/NPM/npm-publish-token":"NPM_TOKEN"}' | ||
|
||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
#scope: '@celo' | ||
|
||
- name: 'Setup yarn' | ||
shell: bash | ||
run: | | ||
npm install --global yarn | ||
source ~/.bashrc | ||
- name: 'Install packages' | ||
shell: bash | ||
run: yarn | ||
|
||
- name: 'Build all packages' | ||
run: yarn build | ||
|
||
- name: Check if a release should be published | ||
run: yarn --silent is_contract_release >> "$GITHUB_ENV" | ||
working-directory: packages/protocol | ||
env: | ||
GITHUB_TAG: ${{ github.ref_name }} | ||
INPUT_VERSION: ${{ inputs.npm_version }} | ||
|
||
- name: Compile solidity contracts and typescript files | ||
run: yarn prepare_contracts_and_abis_publishing | ||
working-directory: packages/protocol | ||
env: | ||
RELEASE_TYPE: ${{ env.RELEASE_TYPE }} | ||
RELEASE_VERSION: ${{ env.RELEASE_VERSION }} | ||
|
||
- name: Publish @celo/contracts | ||
run: npm publish $RELEASE_TYPE $DRY_RUN | ||
working-directory: packages/protocol/contracts | ||
env: | ||
RELEASE_TYPE: ${{ env.RELEASE_TYPE != '' && '--tag $RELEASE_TYPE' || '' }} | ||
RELEASE_VERSION: ${{ env.RELEASE_VERSION }} | ||
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }} | ||
DRY_RUN: ${{ env.RELEASE_VERSION == '' && '--dry-run' || '' }} | ||
|
||
- name: Publish @celo/abis | ||
run: npm publish $RELEASE_TYPE $DRY_RUN | ||
working-directory: packages/protocol/abis | ||
env: | ||
RELEASE_TYPE: ${{ env.RELEASE_TYPE != '' && '--tag $RELEASE_TYPE' || '' }} | ||
RELEASE_VERSION: ${{ env.RELEASE_VERSION }} | ||
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }} | ||
DRY_RUN: ${{ env.RELEASE_VERSION == '' && '--dry-run' || '' }} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
module.exports = { | ||
collectCoverageFrom: ['**/src/**/*.ts?(x)', '!**/*.d.ts'], | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], | ||
testMatch: ['**/?(*.)(spec|test).ts?(x)'], | ||
collectCoverageFrom: ['**/src/**/*.ts', '!**/*.d.ts'], | ||
moduleFileExtensions: ['ts', 'js', 'json', 'node'], | ||
testMatch: ['**/?(*.)(spec|test).ts'], | ||
transform: { | ||
'\\.(ts|tsx)$': 'ts-jest', | ||
'^.+\\.jsx?$': 'babel-jest', | ||
'\\.ts$': 'ts-jest', | ||
}, | ||
} |
Oops, something went wrong.