-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fix release workflow auto deployment logic
- Loading branch information
Showing
75 changed files
with
31,539 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,30 +25,22 @@ jobs: | |
- name: Setup Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
|
||
- name: Install Bun | ||
uses: oven-sh/setup-bun@v2 | ||
|
||
- name: Install ABIGen | ||
run: | | ||
go install github.com/ethereum/go-ethereum/cmd/[email protected] | ||
- name: Install Bun | ||
uses: oven-sh/setup-bun@v1 | ||
|
||
- name: Generate Bindings | ||
run: | | ||
bun install --frozen-lockfile | ||
bun run build | ||
bun run generate-bindings | ||
- name: Check for Go Bindings Changes | ||
- name: Check for Bindings Changes | ||
run: | | ||
if [ $(git status --porcelain | sed 's/^...//' | grep bindings/ | wc -l) -ne 0 ]; then | ||
echo "Changes in Go Bindings" | ||
echo "Changes in Generated Bindings" | ||
echo $(git status --porcelain | sed 's/^...//' | grep bindings/) | ||
exit 1 | ||
fi | ||
- name: Check for TypeScript Bindings Changes | ||
run: | | ||
if [ $(git status --porcelain | sed 's/^...//' | grep src/evm/contracts/ | wc -l) -ne 0 ]; then | ||
echo "Changes in TypeScript Bindings" | ||
echo $(git status --porcelain | sed 's/^...//' | grep src/evm/contracts/) | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ jobs: | |
go install github.com/ethereum/go-ethereum/cmd/[email protected] | ||
- name: Install Bun | ||
uses: oven-sh/setup-bun@v1 | ||
uses: oven-sh/setup-bun@v2 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,10 @@ on: | |
tags: | ||
- "v*.*.*" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
artifacts: | ||
runs-on: ubuntu-latest | ||
|
@@ -35,7 +39,7 @@ jobs: | |
cp -r out/Moon.sol/Moon.json artifacts/ | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: compiled-contracts | ||
path: artifacts | ||
|
@@ -44,12 +48,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: artifacts | ||
environment: release | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: "recursive" | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: compiled-contracts | ||
path: ./artifacts | ||
|
@@ -69,6 +78,12 @@ jobs: | |
needs: release | ||
environment: release | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: "recursive" | ||
|
||
- name: Get Latest Version | ||
id: version | ||
uses: pozetroninc/github-action-get-latest-release@master | ||
|
@@ -80,20 +95,31 @@ jobs: | |
with: | ||
go-version: "1.21.3" | ||
|
||
- name: Setup Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
|
||
- name: Install ABIGen | ||
run: | | ||
go install github.com/ethereum/go-ethereum/cmd/[email protected] | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "22.3.0" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Install Bun | ||
uses: oven-sh/setup-bun@v2 | ||
|
||
# Ensure /v2 is updated as the major version changes | ||
- name: Update Go Registry | ||
run: | | ||
GOPROXY=proxy.golang.org go list \ | ||
-m github.com/open-ibc/vibc-core-smart-contracts/v2@${{ steps.version.outputs.release }} | ||
- name: Update NPM Registry | ||
run: | | ||
npm ci | ||
npm publish --provenance --access public | ||
bun install --frozen-lockfile | ||
bun run build | ||
npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Update Go Registry | ||
run: | | ||
( cd ./bindings && \ | ||
GOPROXY=proxy.golang.org go list \ | ||
-m github.com/open-ibc/vibc-core-smart-contracts/bindings@${{ steps.version.outputs.release }} ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ src/contracts.template.ts | |
forge-cache/ | ||
|
||
node_modules | ||
package-lock.json | ||
.env | ||
coverage | ||
coverage.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.