Skip to content

add binary build workflow #5

add binary build workflow

add binary build workflow #5

Workflow file for this run

name: Cross-Platform Build on New Tag
on:
pull_request:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: linux
arch: amd64
# - os: linux
# arch: arm64
# - os: darwin
# arch: amd64
# - os: darwin
# arch: arm64
# - os: windows
# arch: amd64
# - os: windows
# arch: 386
# - os: freebsd
# arch: amd64
# - os: freebsd
# arch: arm
steps:
- uses: actions/checkout@v2
- name: Copy instantswap file
run: cp ./libwallet/instantswap/instant_example.json ./libwallet/instantswap/instant.json
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./reproduciblebuilds/Dockerfile
platforms: ${{ matrix.os }}/${{ matrix.arch }}
push: false
tags: user/app:latest
build-args: |
BUILDOS=${{ matrix.os }}
BUILDARCH=${{ matrix.arch }}
BUILDNAME=cryptopower-${{ matrix.os }}-${{ matrix.arch }}
- name: Create Container
run: |
docker create --name temp-container user/app:latest
docker cp temp-container:/app/myapp-linux-amd64 ./myapp-linux-amd64
docker rm temp-container
- name: Upload Binary
uses: actions/upload-artifact@v2
with:
name: myapp-binary
path: ./myapp-linux-amd64