Skip to content

Commit

Permalink
Merge pull request #19 from loreum-org/release/holesky
Browse files Browse the repository at this point in the history
chore: Adds Holesky release
  • Loading branch information
xhad authored Mar 20, 2024
2 parents d34517b + fa27f6d commit 6e3e46f
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 6 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Create Release

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions-ecosystem/action-get-merged-pull-request@v1
id: get-merged-pull-request
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions-ecosystem/action-release-label@v1
id: release-label
if: ${{ steps.get-merged-pull-request.outputs.title != null }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
labels: ${{ steps.get-merged-pull-request.outputs.labels }}

- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
if: ${{ steps.release-label.outputs.level != null }}
with:
semver_only: true

- uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
if: ${{ steps.release-label.outputs.level != null }}
with:
current_version: ${{ steps.get-latest-tag.outputs.tag }}
level: ${{ steps.release-label.outputs.level }}

- uses: actions-ecosystem/action-regex-match@v2
id: regex-match
if: ${{ steps.bump-semver.outputs.new_version != null }}
with:
text: ${{ steps.get-merged-pull-request.outputs.body }}
regex: '```release_note([\s\S]*)```'

- uses: actions-ecosystem/action-push-tag@v1
if: ${{ steps.bump-semver.outputs.new_version != null }}
with:
tag: ${{ steps.bump-semver.outputs.new_version }}
message: "${{ steps.bump-semver.outputs.new_version }}: PR #${{ steps.get-merged-pull-request.outputs.number }} ${{ steps.get-merged-pull-request.outputs.title }}"

- uses: actions/create-release@v1
if: ${{ steps.release-label.outputs.level == 'major' || steps.release-label.outputs.level == 'minor' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump-semver.outputs.new_version }}
release_name: ${{ steps.bump-semver.outputs.new_version }}
body: ${{ steps.regex-match.outputs.group1 }}

- uses: actions-ecosystem/action-create-comment@v1
if: ${{ steps.bump-semver.outputs.new_version != null }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.get-merged-pull-request.outputs.number }}
body: |
The new version [${{ steps.bump-semver.outputs.new_version }}](https://github.com/${{ github.repository }}/releases/tag/${{ steps.bump-semver.outputs.new_version }}) has been released :tada:
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"npmClient": "yarn",
"npmClient": "npm",
"packages": ["subgraphs/**/*"],
"useWorkspaces": true,
"useWorkspaces": false,
"version": "independent"
}
6 changes: 6 additions & 0 deletions subgraphs/chamber/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@
"address": "0x46A49D4391F2F220D3661b2a2BFe4b306EE18845",
"startBlock": 5433794
}
},
"holesky": {
"Registry": {
"address": "0x5ed9315ab0274B0C546b71ed5a7ABE9982FF1E8D",
"startBlock": 1175645
}
}
}
2 changes: 2 additions & 0 deletions subgraphs/chamber/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"create:local": "graph create --node http://localhost:8020/ chamber --network localhost",
"remove:local": "graph remove --node http://localhost:8020/ chamber --network localhost",
"deploy:local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 chamber --version-label v0.0.1 --network localhost",
"build:holesky": "graph build subgraph.yaml --network holesky",
"deploy:holesky": "graph deploy --studio --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ loreum/loreum-registry-holesky subgraph.yaml --network holesky",
"build:sepolia": "graph build subgraph.yaml --network sepolia",
"build:mainnet": "graph build subgraph.yaml --network mainnet",
"deploy:sepolia": "graph deploy --studio --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ loreum/loreum-registry-sepolia subgraph.yaml --network sepolia",
Expand Down
8 changes: 4 additions & 4 deletions subgraphs/chamber/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ schema:
dataSources:
- kind: ethereum
name: Registry
network: sepolia
network: holesky
source:
abi: Registry
address: "0x46A49D4391F2F220D3661b2a2BFe4b306EE18845"
startBlock: 5281759
address: "0x5ed9315ab0274B0C546b71ed5a7ABE9982FF1E8D"
startBlock: 1175645
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -30,7 +30,7 @@ dataSources:
templates:
- kind: ethereum
name: Chamber
network: sepolia
network: holesky
source:
abi: Chamber
mapping:
Expand Down

0 comments on commit 6e3e46f

Please sign in to comment.