From 4ce17fce951c1641bc52c71f8eafe6cce695263e Mon Sep 17 00:00:00 2001 From: Noisekit Date: Wed, 18 Oct 2023 14:37:17 +0800 Subject: [PATCH] Releases for governance and oracle-manager --- .github/workflows/release-governance.yml | 51 +++++++++++++++++++ .../{release-lp.yml => release-liquidity.yml} | 25 +++++---- .github/workflows/release-oracle-manager.yml | 51 +++++++++++++++++++ .github/workflows/release-website.yml | 7 ++- governance/ui/package.json | 3 +- liquidity/ui/package.json | 3 +- oracle-manager/ui/package.json | 3 +- 7 files changed, 120 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/release-governance.yml rename .github/workflows/{release-lp.yml => release-liquidity.yml} (64%) create mode 100644 .github/workflows/release-oracle-manager.yml diff --git a/.github/workflows/release-governance.yml b/.github/workflows/release-governance.yml new file mode 100644 index 000000000..b9de3f3b3 --- /dev/null +++ b/.github/workflows/release-governance.yml @@ -0,0 +1,51 @@ +name: release-governance + +on: + push: + tags: + - 'release-governance-*' + branches: + - 'governance-synthetix-eth' + - 'releases' + +jobs: + release-governance: + runs-on: ubuntu-latest + steps: + - run: git config --global user.email engineering@snxdao.io + - run: git config --global user.name synthetix-team + + - uses: actions/checkout@v4 + with: + path: governance + repository: 'Synthetixio/v3.synthetix.eth' + ref: 'master' + ssh-key: '${{ secrets.GOVERNANCE_SSH_KEY }}' + + - uses: actions/checkout@v4 + with: + path: v3ui + ref: '${{ github.sha }}' + ssh-key: '${{ secrets.V3UI_SSH_KEY }}' + + - run: yarn workspaces focus @snx-v3/governance + working-directory: v3ui + + - run: yarn workspace @snx-v3/governance build + working-directory: v3ui + + - run: rm -rf ./governance/* + - run: cp -r ./v3ui/governance/ui/dist ./governance/ + + - run: git add . + working-directory: governance + + - run: | + git commit -m "Release ${{ github.event.release.name }}" \ + --allow-empty \ + -m "Source: ${{ github.server_url}}/${{ github.repository }}" \ + -m "Commit: ${{ github.sha }}" + working-directory: governance + + - run: git push origin master + working-directory: governance diff --git a/.github/workflows/release-lp.yml b/.github/workflows/release-liquidity.yml similarity index 64% rename from .github/workflows/release-lp.yml rename to .github/workflows/release-liquidity.yml index 3d1d1df15..ad597bf3f 100644 --- a/.github/workflows/release-lp.yml +++ b/.github/workflows/release-liquidity.yml @@ -1,16 +1,15 @@ -name: release-lp +name: release-liquidity on: push: tags: - - 'release-lp-*' + - 'release-liquidity-*' branches: - 'liquidity-synthetix-eth' + - 'releases' jobs: - release-lp: - # Should be good without checks, we wouldn't release smth that's broken - # if: ${{ github.event.check_suite.conclusion == 'success' }} + release-liquidity: runs-on: ubuntu-latest steps: - run: git config --global user.email engineering@snxdao.io @@ -18,16 +17,16 @@ jobs: - uses: actions/checkout@v4 with: - path: lp + path: liquidity repository: 'Synthetixio/liquidity.synthetix.eth' ref: 'master' - ssh-key: '${{ secrets.LIQUIDITY_UI_DEPLOYER_SSH_PRIVATE_KEY }}' + ssh-key: '${{ secrets.LIQUIDITY_SSH_KEY }}' - uses: actions/checkout@v4 with: path: v3ui ref: '${{ github.sha }}' - ssh-key: '${{ secrets.SSH_PRIVATE_KEY }}' + ssh-key: '${{ secrets.V3UI_SSH_KEY }}' - run: yarn workspaces focus @snx-v3/liquidity working-directory: v3ui @@ -35,18 +34,18 @@ jobs: - run: yarn workspace @snx-v3/liquidity build working-directory: v3ui - - run: rm -rf ./lp/* - - run: cp -r ./v3ui/liquidity/ui/dist/* ./lp/ + - run: rm -rf ./liquidity/* + - run: cp -r ./v3ui/liquidity/ui/dist/* ./liquidity/ - run: git add . - working-directory: lp + working-directory: liquidity - run: | git commit -m "Release ${{ github.event.release.name }}" \ --allow-empty \ -m "Source: ${{ github.server_url}}/${{ github.repository }}" \ -m "Commit: ${{ github.sha }}" - working-directory: lp + working-directory: liquidity - run: git push origin master - working-directory: lp + working-directory: liquidity diff --git a/.github/workflows/release-oracle-manager.yml b/.github/workflows/release-oracle-manager.yml new file mode 100644 index 000000000..f1ece57d4 --- /dev/null +++ b/.github/workflows/release-oracle-manager.yml @@ -0,0 +1,51 @@ +name: release-oracle-manager + +on: + push: + tags: + - 'release-oracle-manager-*' + branches: + - 'oracle-manager-synthetix-eth' + - 'releases' + +jobs: + release-oracle-manager: + runs-on: ubuntu-latest + steps: + - run: git config --global user.email engineering@snxdao.io + - run: git config --global user.name synthetix-team + + - uses: actions/checkout@v4 + with: + path: oracle-manager + repository: 'Synthetixio/oracle-manager.synthetix.eth' + ref: 'master' + ssh-key: '${{ secrets.ORACLE_MANAGER_SSH_KEY }}' + + - uses: actions/checkout@v4 + with: + path: v3ui + ref: '${{ github.sha }}' + ssh-key: '${{ secrets.V3UI_SSH_KEY }}' + + - run: yarn workspaces focus @snx-v3/oracle-manager + working-directory: v3ui + + - run: yarn workspace @snx-v3/oracle-manager build + working-directory: v3ui + + - run: rm -rf ./oracle-manager/* + - run: cp -r ./v3ui/oracle-manager/ui/dist ./oracle-manager/ + + - run: git add . + working-directory: oracle-manager + + - run: | + git commit -m "Release ${{ github.event.release.name }}" \ + --allow-empty \ + -m "Source: ${{ github.server_url}}/${{ github.repository }}" \ + -m "Commit: ${{ github.sha }}" + working-directory: oracle-manager + + - run: git push origin master + working-directory: oracle-manager diff --git a/.github/workflows/release-website.yml b/.github/workflows/release-website.yml index 2c220e292..a98ec19e9 100644 --- a/.github/workflows/release-website.yml +++ b/.github/workflows/release-website.yml @@ -6,11 +6,10 @@ on: - 'release-website-*' branches: - 'v3-synthetix-eth' + - 'releases' jobs: release-website: - # Should be good without checks, we wouldn't release smth that's broken - # if: ${{ github.event.check_suite.conclusion == 'success' }} runs-on: ubuntu-latest steps: - run: git config --global user.email engineering@snxdao.io @@ -21,13 +20,13 @@ jobs: path: website repository: 'Synthetixio/v3.synthetix.eth' ref: 'master' - ssh-key: '${{ secrets.V3_WEBSITE_DEPLOYER_SSH_PRIVATE_KEY }}' + ssh-key: '${{ secrets.WEBSITE_SSH_KEY }}' - uses: actions/checkout@v4 with: path: v3ui ref: '${{ github.sha }}' - ssh-key: '${{ secrets.SSH_PRIVATE_KEY }}' + ssh-key: '${{ secrets.V3UI_SSH_KEY }}' - run: yarn workspaces focus @snx-v3/website working-directory: v3ui diff --git a/governance/ui/package.json b/governance/ui/package.json index 241802f5c..8bc7450bf 100644 --- a/governance/ui/package.json +++ b/governance/ui/package.json @@ -6,8 +6,7 @@ "start": "webpack-cli serve", "build": "NODE_ENV=production webpack-cli", "load-env": "source ./load-env.sh", - "standalone-install": "yarn workspaces focus '@snx-v3/governance'", - "standalone-build": "yarn workspaces foreach --topological-dev --recursive --verbose --from '@snx-v3/governance' run build" + "focus": "yarn workspaces focus '@snx-v3/governance'" }, "dependencies": { "@chakra-ui/icons": "^2.1.1", diff --git a/liquidity/ui/package.json b/liquidity/ui/package.json index b33516496..aebc4ed4d 100644 --- a/liquidity/ui/package.json +++ b/liquidity/ui/package.json @@ -5,8 +5,7 @@ "scripts": { "start": "webpack-cli serve", "build": "NODE_ENV=production webpack-cli", - "standalone-install": "yarn workspaces focus '@synthetixio/v3-ui'", - "standalone-build": "yarn workspaces foreach --topological-dev --recursive --verbose --from '@snx-v3/liquidity' run build" + "focus": "yarn workspaces focus '@synthetixio/v3-ui'" }, "dependencies": { "@chakra-ui/icons": "^2.1.1", diff --git a/oracle-manager/ui/package.json b/oracle-manager/ui/package.json index 79fadecd9..cfc1d4acc 100644 --- a/oracle-manager/ui/package.json +++ b/oracle-manager/ui/package.json @@ -6,8 +6,7 @@ "start": "webpack-cli serve", "build": "NODE_ENV=production webpack-cli", "load-env": "source load-env.sh", - "standalone-install": "yarn workspaces focus '@snx-v3/oracle-manager'", - "standalone-build": "yarn workspaces foreach --topological-dev --recursive --verbose --from '@snx-v3/oracle-manager' run build" + "focus": "yarn workspaces focus '@snx-v3/oracle-manager'" }, "dependencies": { "@chakra-ui/icons": "^2.1.1",