bump package version to v0.0.13 (#180) #9
Workflow file for this 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
name: Release | |
on: | |
push: | |
tags: | |
- 'v[0-9]+\.[0-9]+\.[0-9]+' | |
- 'v[0-9]+\.[0-9]+\.[0-9]+-alpha[0-9]+' | |
- 'v[0-9]+\.[0-9]+\.[0-9]+-beta[0-9]+' | |
- 'v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+' | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
packages: write # This is required to publish to github package repository | |
attestations: write # This is required to publish to github package repository | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: world-chain-deployer-image | |
TEST_RPC_URL: http://127.0.0.1:8545 | |
TEST_PRIVATE_KEY: '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80' | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # This is required for git show-ref to work | |
- name: Build and lint | |
uses: ./.github/actions/build-and-lint | |
Test: | |
runs-on: ubuntu-latest | |
needs: Build | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # This is required for git show-ref to work | |
- name: Test | |
uses: ./.github/actions/unit-test | |
SmokeTest: | |
runs-on: ubuntu-latest | |
needs: Test | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # This is required for git show-ref to work | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8.11.x | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Run local anvil node | |
run: | | |
./scripts/run-local-node.sh & | |
- name: Docker meta | |
uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=branch | |
type=sha,format=long | |
- name: Build deployer image for testing | |
id: build_and_push | |
uses: docker/build-push-action@v5 | |
with: | |
push: false | |
load: true | |
file: build/package/world.dockerfile | |
context: . | |
platforms: linux/amd64 | |
build-args: | | |
IMAGE_TAG=${{ github.ref_name }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
outputs: type=docker | |
- name: Run deployer image | |
run: | | |
docker run --name world-chain-deployer-image-TEST -i --rm=false --network="host" ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:sha-${GITHUB_SHA} --rpc-url $TEST_RPC_URL --private-key $TEST_PRIVATE_KEY | |
docker cp world-chain-deployer-image-TEST:/monorepo/run_env.json ./docker_run_env.json | |
- name: Load Environment Variables from JSON | |
run: | | |
echo "WORLD_ADDRESS=$(jq -r '.WORLD_ADDRESS' docker_run_env.json)" >> $GITHUB_ENV | |
echo "FORWARDER_ADDRESS=$(jq -r '.FORWARDER_ADDRESS' docker_run_env.json)" >> $GITHUB_ENV | |
- name: Install packages | |
shell: bash | |
run: | | |
pnpm install | |
pnpm nx run-many -t build | |
- name: Testing Smart Character creation | |
run: | | |
export WORLD_ADDRESS | |
export FORWARDER_ADDRESS | |
export RPC_URL=$TEST_RPC_URL | |
export PRIVATE_KEY=$TEST_PRIVATE_KEY | |
pnpm nx createSmartCharacter:ci end-to-end-tests | |
- name: Testing ERC20 creation and minting | |
run: | | |
export WORLD_ADDRESS | |
export FORWARDER_ADDRESS | |
export RPC_URL=$TEST_RPC_URL | |
export PRIVATE_KEY=$TEST_PRIVATE_KEY | |
pnpm nx createMintERC20:ci end-to-end-tests | |
- name: Testing Smart Storage Unit creation and anchoring | |
run: | | |
export WORLD_ADDRESS | |
export FORWARDER_ADDRESS | |
export RPC_URL=$TEST_RPC_URL | |
export PRIVATE_KEY=$TEST_PRIVATE_KEY | |
pnpm nx createAndAnchor:ci end-to-end-tests | |
ReleaseImage: | |
runs-on: ubuntu-latest | |
needs: SmokeTest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Docker meta | |
uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
- name: Build deployer image | |
id: build_and_push | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
file: build/package/world.dockerfile | |
context: . | |
platforms: linux/amd64 | |
build-args: | | |
IMAGE_TAG=${{ github.ref_name }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |