Skip to content

Commit 2274a0c

Browse files
committed
more ci changes
1 parent e29543f commit 2274a0c

File tree

3 files changed

+89
-4
lines changed

3 files changed

+89
-4
lines changed

.github/workflows/e2e-testnet.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ on:
1010
release-version:
1111
description: "Test Release version (v#.#.#[-rc#])"
1212
required: true
13+
ethereum-utils-version:
14+
description: "Ethereum utils version to use (v#.#.#[-rc#])"
15+
required: true
1316

1417
env:
1518
TAG_FROM_UI: ${{github.event.inputs.release-version}}
19+
ETHEREUM_UTILS_FROM_UI: ${{github.event.inputs.ethereum-utils-version}}
1620

1721
# Set default permissions as restrictive
1822
permissions:
@@ -29,10 +33,12 @@ jobs:
2933
shell: bash
3034
run: |
3135
version=${{env.TAG_FROM_UI}}
36+
ethereum_utils_version=${{env.ETHEREUM_UTILS_FROM_UI}}
3237
echo "Release version entered in UI: $version"
38+
echo "Ethereum utils version entered in UI: $ethereum_utils_version"
3339
regex='^v([0-9]+)\.(0|([1-9][0-9]*))\.(0|([1-9][0-9]*))(-rc[1-9][0-9]*)?$'
34-
if [[ ! $version =~ $regex ]]; then
35-
echo "ERROR: Entered version $version is not valid."
40+
if [[ ! $version =~ $regex ]] || [[ ! $ethereum_utils_version =~ $regex ]]; then
41+
echo "ERROR: Entered version $version or ethereum_version $ethereum_utils_version is not valid."
3642
echo "Please use v#.#.#[-rc#] format."
3743
exit 1
3844
fi
@@ -44,14 +50,15 @@ jobs:
4450
- name: Set Env Vars
4551
run: |
4652
echo "API_AUGMENT_VERSION=$(echo ${{ env.TAG_FROM_UI }} | sed 's/^v//')" >> $GITHUB_ENV
53+
echo "ETHEREUM_UTILS_VERSION=$(echo ${{ env.ETHEREUM_UTILS_FROM_UI }} | sed 's/^v//')" >> $GITHUB_ENV
4754
- name: Set up NodeJs
4855
uses: actions/setup-node@v4
4956
with:
5057
node-version: 22
5158
cache: "npm"
5259
cache-dependency-path: e2e/package-lock.json
5360
- name: Install Built api-augment
54-
run: npm install @frequency-chain/api-augment@${{ env.API_AUGMENT_VERSION }}
61+
run: npm install @frequency-chain/api-augment@${{ env.API_AUGMENT_VERSION }} @frequency-chain/ethereum-utils@${{ env.ETHEREUM_UTILS_VERSION }}
5562
working-directory: e2e
5663
- name: Fund e2e Tests
5764
working-directory: e2e
@@ -87,14 +94,15 @@ jobs:
8794
- name: Set Env Vars
8895
run: |
8996
echo "API_AUGMENT_VERSION=$(echo ${{ env.TAG_FROM_UI }} | sed 's/^v//')" >> $GITHUB_ENV
97+
echo "ETHEREUM_UTILS_VERSION=$(echo ${{ env.ETHEREUM_UTILS_FROM_UI }} | sed 's/^v//')" >> $GITHUB_ENV
9098
- name: Set up NodeJs
9199
uses: actions/setup-node@v4
92100
with:
93101
node-version: 22
94102
cache: "npm"
95103
cache-dependency-path: e2e/package-lock.json
96104
- name: Install Built api-augment
97-
run: npm install @frequency-chain/api-augment@${{ env.API_AUGMENT_VERSION }}
105+
run: npm install @frequency-chain/api-augment@${{ env.API_AUGMENT_VERSION }} @frequency-chain/ethereum-utils@${{ env.ETHEREUM_UTILS_VERSION }}
98106
working-directory: e2e
99107
- name: E2E Test - ${{ matrix.test-file }}
100108
working-directory: e2e

.github/workflows/release.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,35 @@ jobs:
476476
path: js/api-augment/dist
477477
if-no-files-found: error
478478

479+
build-js-ethereum-utils:
480+
name: Build JS Ethereum utils
481+
runs-on: ubuntu-24.04
482+
container: ghcr.io/frequency-chain/frequency/ci-base-image:1.5.5
483+
steps:
484+
- name: Check Out Repo
485+
uses: actions/checkout@v4
486+
with:
487+
ref: ${{env.RELEASE_BRANCH_NAME}}
488+
- name: Set up NodeJs
489+
uses: actions/setup-node@v4
490+
with:
491+
node-version: 20
492+
cache: "npm"
493+
registry-url: "https://registry.npmjs.org"
494+
cache-dependency-path: js/ethereum-utils/package-lock.json
495+
- name: Install
496+
run: npm install
497+
working-directory: js/ethereum-utils
498+
- name: Build
499+
run: npm run build
500+
working-directory: js/ethereum-utils
501+
- name: Upload Dist Dir
502+
uses: actions/upload-artifact@v4
503+
with:
504+
name: js-ethereum-utils-${{github.run_id}}
505+
path: js/ethereum-utils/dist
506+
if-no-files-found: error
507+
479508
build-js-schemas:
480509
name: Build JS Schemas
481510
runs-on: ubuntu-24.04
@@ -705,6 +734,7 @@ jobs:
705734
test-version-matches-release,
706735
build-rust-developer-docs,
707736
build-js-api-augment,
737+
build-js-ethereum-utils,
708738
build-js-schemas,
709739
]
710740
name: Wait for All Builds to Finish
@@ -1205,6 +1235,52 @@ jobs:
12051235
env:
12061236
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
12071237

1238+
release-js-ethereum-utils:
1239+
needs: wait-for-all-builds
1240+
name: Release JS Ethereum utils
1241+
runs-on: ubuntu-24.04
1242+
steps:
1243+
- name: Check Out Repo
1244+
uses: actions/checkout@v4
1245+
with:
1246+
ref: ${{env.RELEASE_BRANCH_NAME}}
1247+
- name: Full Release?
1248+
id: is-full-release
1249+
uses: ./.github/workflows/common/is-full-release
1250+
with:
1251+
version-tag: ${{env.NEW_RELEASE_TAG}}
1252+
- name: Set up NodeJs
1253+
uses: actions/setup-node@v4
1254+
with:
1255+
node-version: 20
1256+
cache: "npm"
1257+
registry-url: "https://registry.npmjs.org"
1258+
cache-dependency-path: js/ethereum-utils/package-lock.json
1259+
- name: Download Dist Dir
1260+
id: download
1261+
uses: actions/download-artifact@v4
1262+
with:
1263+
name: js-api-ethereum-utils-${{github.run_id}}
1264+
path: js/ethereum-utils/dist
1265+
- name: Version Package
1266+
if: env.TEST_RUN != 'true'
1267+
run: npm version --new-version "${{env.NEW_RELEASE_TAG}}" --no-git-tag-version
1268+
working-directory: js/ethereum-utils/dist
1269+
- name: Release on NPM @latest
1270+
if: env.TEST_RUN != 'true' &&
1271+
steps.is-full-release.outputs.is-full-release == 'true'
1272+
run: npm publish --tag latest --access public
1273+
working-directory: ./js/ethereum-utils/dist
1274+
env:
1275+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
1276+
- name: Release Candidate on NPM
1277+
if: env.TEST_RUN != 'true' &&
1278+
steps.is-full-release.outputs.is-full-release != 'true'
1279+
run: npm publish --tag next --access public
1280+
working-directory: ./js/ethereum-utils/dist
1281+
env:
1282+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
1283+
12081284
release-js-schemas:
12091285
needs: wait-for-all-builds
12101286
name: Release JS Schemas

.github/workflows/verify-pr-commit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
- '**/Cargo.toml'
5050
- '**/Cargo.lock'
5151
- 'js/api-augment/**'
52+
- 'js/ethereum-utils/**'
5253
- 'e2e/**/*.{ts,json}'
5354
cargo-lock:
5455
- '**/Cargo.toml'

0 commit comments

Comments
 (0)