Implement CI/CD workflows for Initia binary builds #1
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: Multi-Architecture Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: [amd64, arm64] | |
os: [linux, darwin] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build for ${{ matrix.os }}-${{ matrix.arch }} | |
env: | |
ARCH: ${{ matrix.arch }} | |
OS: ${{ matrix.os }} | |
L1_VERSION: ${{ github.sha }} | |
L1_NETWORK_NAME: testnet | |
MOVEVM_VERSION: v0.1.0 # 적절한 버전으로 변경하세요 | |
run: | | |
docker buildx build --platform ${{ matrix.os }}/${{ matrix.arch }} \ | |
--file .github/workflows/Dockerfile \ | |
--build-arg ARCH=${{ matrix.arch }} \ | |
--build-arg OS=${{ matrix.os }} \ | |
--build-arg L1_VERSION=${{ env.L1_VERSION }} \ | |
--build-arg L1_NETWORK_NAME=${{ env.L1_NETWORK_NAME }} \ | |
--build-arg MOVEVM_VERSION=${{ env.MOVEVM_VERSION }} \ | |
--output type=local,dest=./output \ | |
. | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: initia-${{ matrix.os }}-${{ matrix.arch }} | |
path: ./output/initia_${{ env.L1_VERSION }}_${{ matrix.os }}_${{ matrix.arch }}.tar.gz |