Skip to content

Commit

Permalink
ci: add release ci
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Nov 21, 2024
1 parent cc17394 commit af86e74
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 14 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: "yarn"

- name: Install deps
Expand Down Expand Up @@ -144,3 +144,33 @@ jobs:
run: |
docker compose down -v
docker system prune -f -a --volumes
release:
runs-on: ubuntu-20.04
needs: [unit-test, lint, integration-test-core-pool, integration-test-isolated-pools, integration-test-governance]
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"

- name: Install deps
run: yarn

- name: Version subgraphs
env:
GITHUB_TOKEN: ${{ secrets.VENUS_TOOLS_TOKEN }}
GIT_AUTHOR_NAME: Venus Tools
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: Venus Tools
GIT_COMMITTER_EMAIL: [email protected]
run: |
yarn workspace @venusprotocol/cross-chain-governance-subgraph run semantic-release
yarn workspace @venusprotocol/etherfi-promo run semantic-release
yarn workspace @venusprotocol/isolated-pools-subgraph run semantic-release
yarn workspace @venusprotocol/protocol-reserve-subgraph run semantic-release
yarn workspace @venusprotocol/core-pool-subgraph run semantic-release
yarn workspace @venusprotocol/governance-subgraph run semantic-release
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ createdb graph-node

Also, you might want to make sure test assertions are not being made against a state that was previously mutated by other test runs. To avoid this scenario, you will want to also recreate your Postgres DB and restart your ipfs and eth node services.


## Versioning / Deployments
Versioning is handled by semantic release based on formatted commits and the config defined in the `.releaserc` of each subgraph.
Branches with the `pre` prefix are versioned as pre-releases.

## Debugging
To query the indexing error use a graphql explorer like [GraphiQl](https://graphiql-online.com/graphiql) to query the graph node for the status of the graph. The endpoint for the hosted service is `https://api.thegraph.com/index-node/graphql`.

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "subgraphs",
"name": "@venusprotocol/subgraphs",
"private": true,
"version": "0.0.0",
"repository": "https://github.com/VenusProtocol/subgraphs",
Expand All @@ -13,6 +13,7 @@
],
"scripts": {
"codegen": "yarn workspaces foreach run codegen",
"semantic-release": "yarn workspaces foreach run semantic-release",
"build:docker": "yarn workspaces foreach run build:docker",
"build:chapel": "yarn workspaces foreach run build:chapel",
"build:bsc": "yarn workspaces foreach run build:bsc",
Expand Down
4 changes: 2 additions & 2 deletions subgraphs/cross-chain-governance/.releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"name": "main"
},
{
"name": "[!main]",
"prerelease": "pr"
"name": "pre-*",
"prerelease": "pre"
}
]
}
4 changes: 2 additions & 2 deletions subgraphs/etherfi-promo/.releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"name": "main"
},
{
"name": "[!main]",
"prerelease": "pr"
"name": "test-*",
"prerelease": "pre"
}
]
}
4 changes: 2 additions & 2 deletions subgraphs/isolated-pools/.releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"name": "main"
},
{
"name": "[!main]",
"prerelease": "pr"
"name": "test-*",
"prerelease": "pre"
}
]
}
4 changes: 2 additions & 2 deletions subgraphs/protocol-reserve/.releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"name": "main"
},
{
"name": "[!main]",
"prerelease": "pr"
"name": "test-*",
"prerelease": "pre"
}
]
}
4 changes: 2 additions & 2 deletions subgraphs/venus-governance/.releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"name": "main"
},
{
"name": "[!main]",
"prerelease": "pr"
"name": "test-*",
"prerelease": "pre"
}
]
}
4 changes: 2 additions & 2 deletions subgraphs/venus/.releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"name": "main"
},
{
"name": "[!main]",
"prerelease": "pr"
"name": "test-*",
"prerelease": "pre"
}
]
}

0 comments on commit af86e74

Please sign in to comment.