Release/v0.4.3 (#1324) #177
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
name: Release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
# map the step outputs to job outputs | |
outputs: | |
l2geth: ${{ steps.packages.outputs.l2geth }} | |
message-relayer: ${{ steps.packages.outputs.message-relayer }} | |
fault-detector: ${{ steps.packages.outputs.fault-detector }} | |
data-transport-layer: ${{ steps.packages.outputs.data-transport-layer }} | |
contracts: ${{ steps.packages.outputs.contracts }} | |
gas-oracle: ${{ steps.packages.outputs.gas-oracle }} | |
replica-healthcheck: ${{ steps.packages.outputs.replica-healthcheck }} | |
proxyd: ${{ steps.packages.outputs.proxyd }} | |
hardhat-node: ${{ steps.packages.outputs.hardhat-node }} | |
l2geth-exporter: ${{ steps.packages.outputs.l2geth-exporter }} | |
batch-submitter: ${{ steps.packages.outputs.batch-submitter }} | |
ci-builder: ${{ steps.packages.outputs.ci-builder }} | |
foundry: ${{ steps.packages.outputs.foundry }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@master | |
with: | |
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | |
fetch-depth: 0 | |
- name: Setup Node.js 16.x | |
uses: actions/setup-node@master | |
with: | |
node-version: 16.x | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Publish To NPM or Create Release Pull Request | |
uses: changesets/action@v1 | |
id: changesets | |
with: | |
publish: yarn release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CI: true | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# Conditional on the release being executed, we unbundle the publishedPackages to specific | |
# job outputs | |
- name: Get version tags from each published version | |
id: packages | |
if: steps.changesets.outputs.published == 'true' | |
run: | | |
node ops/scripts/ci-versions.js ${{ toJSON(steps.changesets.outputs.publishedPackages) }} | |
l2geth: | |
name: Publish L2Geth Version ${{ needs.release.outputs.l2geth }} | |
needs: release | |
if: needs.release.outputs.l2geth != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Publish L2Geth | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./l2geth/Dockerfile | |
push: true | |
tags: mantlenetworkio/l2geth:${{ needs.release.outputs.l2geth }},mantlenetworkio/l2geth:latest | |
gas-oracle: | |
name: Publish Gas Oracle Version ${{ needs.release.outputs.gas-oracle }} | |
needs: release | |
if: needs.release.outputs.gas-oracle != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Publish Gas Oracle | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./gas-oracle/Dockerfile | |
push: true | |
tags: mantlenetworkio/gas-oracle:${{ needs.release.outputs.gas-oracle }},mantlenetworkio/gas-oracle:latest | |
hardhat-node: | |
name: Publish Hardhat Node ${{ needs.release.outputs.hardhat-node }} | |
needs: release | |
if: needs.release.hardhat-node != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Publish Hardhat Node | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ops/docker/hardhat | |
file: ./Dockerfile | |
push: true | |
tags: mantlenetworkio/hardhat-node:${{ needs.release.outputs.gas-oracle }},mantlenetworkio/hardhat-node:latest | |
ci-builder: | |
name: Publish ci-builder ${{ needs.release.outputs.ci-builder }} | |
needs: release | |
if: needs.release.outputs.ci-builder != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Publish ci-builder | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ops/docker/ci-builder | |
file: ./ops/docker/ci-builder/Dockerfile | |
push: true | |
tags: mantlenetworkio/ci-builder:${{ needs.release.outputs.ci-builder }},mantlenetworkio/ci-builder:latest | |
foundry: | |
name: Publish foundry ${{ needs.release.outputs.foundry }} | |
needs: release | |
if: needs.release.outputs.foundry != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Publish foundry | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./ops/docker/foundry/Dockerfile | |
push: true | |
tags: mantlenetworkio/foundry:${{ needs.release.outputs.foundry }},mantlenetworkio/foundry:latest | |
proxyd: | |
name: Publish proxyd Version ${{ needs.release.outputs.proxyd }} | |
needs: release | |
if: needs.release.outputs.proxyd != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Set build args | |
id: build_args | |
run: | | |
echo ::set-output name=GITDATE::"$(date +%d-%m-%Y)" | |
echo ::set-output name=GITVERSION::$(jq -r .version ./proxyd/package.json) | |
echo ::set-output name=GITCOMMIT::"$GITHUB_SHA" | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./proxyd/Dockerfile | |
push: true | |
tags: mantlenetworkio/proxyd:${{ needs.release.outputs.proxyd }},mantlenetworkio/proxyd:latest | |
build-args: | | |
GITDATE=${{ steps.build_args.outputs.GITDATE }} | |
GITCOMMIT=${{ steps.build_args.outputs.GITCOMMIT }} | |
GITVERSION=${{ steps.build_args.outputs.GITVERSION }} | |
l2geth-exporter: | |
name: Publish l2geth-exporter Version ${{ needs.release.outputs.l2geth-exporter}} | |
needs: release | |
if: needs.release.outputs.l2geth-exporter != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Set build args | |
id: build_args | |
run: | | |
echo ::set-output name=GITDATE::"$(date +%d-%m-%Y)" | |
echo ::set-output name=GITVERSION::$(jq -r .version ./l2geth-exporter/package.json) | |
echo ::set-output name=GITCOMMIT::"$GITHUB_SHA" | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./l2geth-exporter/Dockerfile | |
push: true | |
tags: mantlenetworkio/l2geth-exporter:${{ needs.release.outputs.l2geth-exporter }},mantlenetworkio/l2geth-exporter:latest | |
build-args: | | |
GITDATE=${{ steps.build_args.outputs.GITDATE }} | |
GITCOMMIT=${{ steps.build_args.outputs.GITCOMMIT }} | |
GITVERSION=${{ steps.build_args.outputs.GITVERSION }} | |
message-relayer: | |
name: Publish Message Relayer Version ${{ needs.release.outputs.message-relayer }} | |
needs: release | |
if: needs.release.outputs.message-relayer != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./ops/docker/Dockerfile.packages | |
target: message-relayer | |
push: true | |
tags: mantlenetworkio/message-relayer:${{ needs.release.outputs.message-relayer }},mantlenetworkio/message-relayer:latest | |
fault-detector: | |
name: Publish Fault Detector Version ${{ needs.release.outputs.fault-detector }} | |
needs: release | |
if: needs.release.outputs.fault-detector != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./ops/docker/Dockerfile.packages | |
target: fault-detector | |
push: true | |
tags: mantlenetworkio/fault-detector:${{ needs.release.outputs.fault-detector }},mantlenetworkio/fault-detector:latest | |
data-transport-layer: | |
name: Publish Data Transport Layer Version ${{ needs.release.outputs.data-transport-layer }} | |
needs: release | |
if: needs.release.outputs.data-transport-layer != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./ops/docker/Dockerfile.packages | |
target: data-transport-layer | |
push: true | |
tags: mantlenetworkio/data-transport-layer:${{ needs.release.outputs.data-transport-layer }},mantlenetworkio/data-transport-layer:latest | |
deployer: | |
name: Publish Deployer Version ${{ needs.release.outputs.contracts }} | |
needs: release | |
if: needs.release.outputs.contracts != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./ops/docker/Dockerfile.packages | |
target: deployer | |
push: true | |
tags: mantlenetworkio/deployer:${{ needs.release.outputs.contracts }},mantlenetworkio/deployer:latest | |
integration-tests: | |
name: Publish Integration tests ${{ needs.release.outputs.integration-tests }} | |
needs: release | |
if: needs.release.outputs.integration-tests != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./ops/docker/Dockerfile.packages | |
target: integration-tests | |
push: true | |
tags: mantlenetworkio/integration-tests:${{ needs.release.outputs.integration-tests }},mantlenetworkio/integration-tests:latest | |
replica-healthcheck: | |
name: Publish Replica Healthcheck Version ${{ needs.release.outputs.replica-healthcheck }} | |
needs: release | |
if: needs.release.outputs.replica-healthcheck != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./ops/docker/Dockerfile.packages | |
target: replica-healthcheck | |
push: true | |
tags: mantlenetworkio/replica-healthcheck:${{ needs.release.outputs.replica-healthcheck }},mantlenetworkio/replica-healthcheck:latest | |
batch-submitter: | |
name: Publish batch-submitter Version ${{ needs.release.outputs.batch-submitter }} | |
needs: release | |
if: needs.release.outputs.batch-submitter != '' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./batch-submitter/Dockerfile | |
push: true | |
tags: mantlenetworkio/batch-submitter:${{ needs.release.outputs.batch-submitter }},mantlenetworkio/batch-submitter:latest |