Skip to content

Merge pull request #75 from axone-protocol/dependabot/github_actions/… #243

Merge pull request #75 from axone-protocol/dependabot/github_actions/…

Merge pull request #75 from axone-protocol/dependabot/github_actions/… #243

Workflow file for this run

name: Build
on:
workflow_call:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
schema-matrix:
runs-on: ubuntu-22.04
outputs:
schema: ${{ steps.set-matrix.outputs.schema }}
steps:
- uses: actions/checkout@v4
- id: set-matrix
run: echo "::set-output name=schema::$(ls schema/ | jq -R -s -c 'split("\n")[:-1] | map(select(test(".json$") | not))')"
build-target:
runs-on: ubuntu-22.04
needs: schema-matrix
strategy:
matrix:
target: [ts, go]
schema: ${{ fromJson(needs.schema-matrix.outputs.schema) }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup node environment (for building)
uses: actions/setup-node@v4
with:
node-version: 18.12.0
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: true
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Install Mage
run: go install github.com/magefile/[email protected]
- name: Build
run: |
mage -v build:${{ matrix.target }} ${{ matrix.schema }}