Add publish to Gitlab CI

This commit is contained in:
David Racero 2021-01-26 12:56:36 +01:00
parent 717cb2beb9
commit 56ba85e946
2 changed files with 47 additions and 27 deletions

View File

@ -1,5 +1,10 @@
stages: stages:
- checks - checks
- prepare
- publish
variables:
IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}
test: test:
stage: checks stage: checks
@ -40,3 +45,24 @@ certora-test:
- certoraRun specs/harness/StableDebtTokenHarness.sol:StableDebtTokenHarness --solc_args "['--optimize']" --verify StableDebtTokenHarness:specs/StableDebtToken.spec --settings -assumeUnwindCond,-b=4 --cache StableDebtToken --cloud - certoraRun specs/harness/StableDebtTokenHarness.sol:StableDebtTokenHarness --solc_args "['--optimize']" --verify StableDebtTokenHarness:specs/StableDebtToken.spec --settings -assumeUnwindCond,-b=4 --cache StableDebtToken --cloud
- certoraRun specs/harness/UserConfigurationHarness.sol --verify UserConfigurationHarness:specs/UserConfiguration.spec --solc_args "['--optimize']" --settings -useBitVectorTheory --cache UserConfiguration --cloud - certoraRun specs/harness/UserConfigurationHarness.sol --verify UserConfigurationHarness:specs/UserConfiguration.spec --solc_args "['--optimize']" --settings -useBitVectorTheory --cache UserConfiguration --cloud
- certoraRun contracts/protocol/tokenization/VariableDebtToken.sol:VariableDebtToken specs/harness/LendingPoolHarnessForVariableDebtToken.sol --solc_args "['--optimize']" --link VariableDebtToken:POOL=LendingPoolHarnessForVariableDebtToken --verify VariableDebtToken:specs/VariableDebtToken.spec --settings -assumeUnwindCond,-useNonLinearArithmetic,-b=4 --cache VariableDebtToken --cloud - certoraRun contracts/protocol/tokenization/VariableDebtToken.sol:VariableDebtToken specs/harness/LendingPoolHarnessForVariableDebtToken.sol --solc_args "['--optimize']" --link VariableDebtToken:POOL=LendingPoolHarnessForVariableDebtToken --verify VariableDebtToken:specs/VariableDebtToken.spec --settings -assumeUnwindCond,-useNonLinearArithmetic,-b=4 --cache VariableDebtToken --cloud
prepare:
stage: prepare
tags:
- docker-builder
script:
- docker build -t ${IMAGE} .
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker push ${IMAGE}
only:
- master
publish:
extends: .image_step
stage: publish
script:
- npm ci
- echo //registry.npmjs.org/:_authToken=${NPM_V2_PACKAGES_TOKEN} > .npmrc
- npm run compile
- ${VERSION}
- npm publish --access public

View File

@ -1,7 +1,11 @@
{ {
"name": "protocol-v2", "name": "@aave/protocol-v2",
"version": "1.0.0", "version": "1.0.0",
"description": "Aave Protocol V2 smart contracts", "description": "Aave Protocol V2 smart contracts",
"files": [
"contracts",
"artifacts"
],
"scripts": { "scripts": {
"run-env": "npm i && tail -f /dev/null", "run-env": "npm i && tail -f /dev/null",
"hardhat": "hardhat", "hardhat": "hardhat",
@ -62,7 +66,8 @@
"main:initialize-tokens": "npm run compile && hardhat --network main full:initialize-tokens --pool Aave", "main:initialize-tokens": "npm run compile && hardhat --network main full:initialize-tokens --pool Aave",
"kovan:initialize-tokens": "npm run compile && hardhat --network kovan full:initialize-tokens --pool Aave", "kovan:initialize-tokens": "npm run compile && hardhat --network kovan full:initialize-tokens --pool Aave",
"external:deploy-assets-kovan": "npm run compile && hardhat --network kovan external:deploy-new-asset --symbol ${SYMBOL} --verify", "external:deploy-assets-kovan": "npm run compile && hardhat --network kovan external:deploy-new-asset --symbol ${SYMBOL} --verify",
"external:deploy-assets-main": "npm run compile && hardhat --network main external:deploy-new-asset --symbol ${SYMBOL} --verify" "external:deploy-assets-main": "npm run compile && hardhat --network main external:deploy-new-asset --symbol ${SYMBOL} --verify",
"prepublishOnly": "npm run compile"
}, },
"devDependencies": { "devDependencies": {
"@nomiclabs/buidler": "^1.4.7", "@nomiclabs/buidler": "^1.4.7",
@ -118,33 +123,22 @@
}, },
"author": "Aave", "author": "Aave",
"contributors": [ "contributors": [
{ "Ernesto Boado <ernesto@aave.com>",
"name": "Emilio Frangella", "Emilio Frangella <emilio@aave.com>",
"email": "emilio@aave.com" "Andrey Kozlov <andrey@aave.com>",
}, "David Racero <david.k@aave.com>",
{ "Pol Sendra <pol@aave.com>",
"name": "Ernesto Boado", "David Truong <david@aave.com>"
"email": "ernesto@aave.com"
},
{
"name": "Andrey Kozlov",
"email": "andrey@aave.com"
},
{
"name": "David Racero",
"email": "david.k@aave.com"
},
{
"name": "Pol Sendra",
"email": "pol@aave.com"
},
{
"name": "David Truong",
"email": "david@aave.com"
}
], ],
"license": "AGPLv3", "license": "AGPLv3",
"dependencies": { "dependencies": {
"tmp-promise": "^3.0.2" "tmp-promise": "^3.0.2"
} },
"keywords": [
"aave",
"protocol",
"protocol-v2",
"ethereum",
"solidity"
]
} }