Skip to content

Commit

Permalink
chore(): trigger release
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshyx committed May 24, 2022
1 parent ab1f412 commit 89fb879
Show file tree
Hide file tree
Showing 6 changed files with 302 additions and 47 deletions.
90 changes: 45 additions & 45 deletions .github/workflows/publish.production.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
name: publish apps on registry for production

on:
release:
types: [published]
paths:
- 'build/**'
jobs:
publish:
name: Update registry apps
runs-on: ubuntu-latest
environment: production
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: 'x64'
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 16.13.0
cache: 'yarn'
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: install root dependencies
env:
CI: 1
run: |
yarn install --frozen-lockfile
- name: Publish new versions
env:
INFURA_ID: ${{ secrets.INFURA_ID_PRODUCTION }}
ETH_DEPLOY_KEY: ${{ secrets.ETH_DEPLOY_KEY_PRODUCTION }}
INTEGRATION_REGISTRY_ADDRESS: ${{ secrets.INTEGRATION_REGISTRY_ADDRESS_PRODUCTION }}
run: |
yarn run compile:sc
yarn run deploy:sc
#name: publish apps on registry for production
#
#on:
# release:
# types: [published]
# paths:
# - 'build/**'
#jobs:
# publish:
# name: Update registry apps
# runs-on: ubuntu-latest
# environment: production
# steps:
# - name: Setup Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.x'
# architecture: 'x64'
# - name: Setup Node
# uses: actions/setup-node@v1
# with:
# node-version: 16.13.0
# cache: 'yarn'
# - name: Checkout
# uses: actions/checkout@v2
# - name: Cache node modules
# uses: actions/cache@v1
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-node-
# - name: install root dependencies
# env:
# CI: 1
# run: |
# yarn install --frozen-lockfile
# - name: Publish new versions
# env:
# INFURA_ID: ${{ secrets.INFURA_ID_PRODUCTION }}
# ETH_DEPLOY_KEY: ${{ secrets.ETH_DEPLOY_KEY_PRODUCTION }}
# INTEGRATION_REGISTRY_ADDRESS: ${{ secrets.INTEGRATION_REGISTRY_ADDRESS_PRODUCTION }}
# run: |
# yarn run compile:sc
# yarn run deploy:sc
2 changes: 1 addition & 1 deletion build/integrations_bucket.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@
"ipfsManifest": "f0155171cf24ee416a97be54abec57009fdae5d6404e1953b8c7ac3def8074941",
"type": 2
}
]
]
5 changes: 5 additions & 0 deletions sdk/.openzeppelin/rinkeby.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
"address": "0x80A254518169f9443BC79F14a9800c438b467df9",
"txHash": "0x16396961b1adc5efeb5b6c30a7842d1c25585680667bd27b36b2118fc78bbc92",
"kind": "transparent"
},
{
"address": "0x92a441451e34b428B943cd69F7f8eDA20b6d30A9",
"txHash": "0x6aa43f45a1d1d626afc6372cc300e0594dc6c78a3ad6f5a9959cbd97159da3cb",
"kind": "transparent"
}
],
"impls": {
Expand Down
2 changes: 2 additions & 0 deletions sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
"typescript": "^4.4.3"
},
"devDependencies": {
"@gnosis.pm/safe-core-sdk": "2.1.0",
"@gnosis.pm/safe-ethers-lib": "1.1.0",
"@nomiclabs/hardhat-ethers": "2.0.6",
"@openzeppelin/hardhat-upgrades": "1.17.0",
"chai": "4.3.4",
Expand Down
85 changes: 85 additions & 0 deletions sdk/src/contracts/scripts/safe-update-app-registry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/* eslint-disable */
const { ethers, upgrades } = require('hardhat');
const Safe = require('@gnosis.pm/safe-core-sdk').default;
const EthersAdapter = require('@gnosis.pm/safe-ethers-lib').default;
// const semver = require('semver');
// const pkgInfos = require('../../../../build/integrations_bucket.json');
async function main() {
const signer = await ethers.getSigner();
const ethAdapter = new EthersAdapter({
ethers,
signer: signer
})
const safeSdk = await Safe.create({ ethAdapter, safeAddress: '0x4941D523fa837A536B8bed834F6e6c807FAba24C' });
const IntegrationRegistry = await ethers.getContractFactory('IntegrationRegistry');
// const IntRegistrar = await upgrades.deployProxy(IntegrationRegistry);
// console.log('IntegrationRegistry deployed to:', IntRegistrar.address);
const safe = '0x4941D523fa837A536B8bed834F6e6c807FAba24C';
// await upgrades.admin.transferProxyAdminOwnership(safe);
const integrationRegistry = await IntegrationRegistry.connect(
'0x92a441451e34b428B943cd69F7f8eDA20b6d30A9',
);
await integrationRegistry.transferOwnership(safe);
const d = await integrationRegistry.functions.release(
"@akashaorg/app-akasha-integration",
"v0.1",
"0x0155171c33b359938f34ff430571aaba23715c7cc7ba49f2e54c5f0558fdb09a",
0,
);

//await integrationRegistry.transferOwnership(safe);

// for(const pkg of pkgInfos){
// if(typeof pkg.type !== "number"){
// continue;
// }
// const packageInfo = await integrationRegistry.getPackageInfo(pkg.id);
// let version;
// if(!packageInfo || !packageInfo.integrationName){
// version = 'v0.1.0';
// } else {
// const currentRelease = await integrationRegistry.getReleaseData(packageInfo.latestReleaseId);
// version = 'v' + semver.inc(currentRelease.version, 'minor');
// }
// console.log('deploying: ', pkg.name, ' version: ',version )
// await integrationRegistry.release(
// pkg.name,
// version,
// '0x'+pkg.ipfsManifest.substring(1),
// pkg.type,
// );
// console.log('deployed: ', pkg.name)
// }
// const readIntegrationRegistry = await ethers.getContractAt(
// 'IntegrationRegistry',
// '0xFB0b97933e5e94b0b0b8dEF09403222b5009bDED',
// );
// const releases = await readIntegrationRegistry.getAllPackageIds(0, 15);
// await integrationRegistry.release(
// 'testPackageHehe',
// 'v0.1.1',
// '0x0170171c23281b16a3c58934162488ad6d039df686eca806f21eba0cebd03486',
// 0,
// );
// const packageId = await integrationRegistry.generateIntegrationId('testPackageHehe');
// console.log('packageId', packageId);
// const packageInfo = await integrationRegistry.getPackageInfo(packageId);
// console.log('packageInfo', packageInfo);
// const releaseData = await integrationRegistry.getReleaseData(packageInfo.latestReleaseId);
// console.log('releaseData', releaseData);
//await akRegistrar.deployed();

// const proxyAddress = '0x80A254518169f9443BC79F14a9800c438b467df9';
//
// const IntegrationRegV1 = await ethers.getContractFactory('IntegrationRegistry');
// console.log('Preparing upgrade...');
// const integrationRegAddr = await upgrades.prepareUpgrade(proxyAddress, IntegrationRegV1);
// console.log('IntegrationRegAddr at:', integrationRegAddr);
}

main()
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
});
Loading

0 comments on commit 89fb879

Please sign in to comment.