Skip to content

ci(release): disable darwin-amd64 until osxcross is implemented #37

ci(release): disable darwin-amd64 until osxcross is implemented

ci(release): disable darwin-amd64 until osxcross is implemented #37

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc*"
permissions:
contents: write
jobs:
build-linux:
name: Build Linux ${{ matrix.arch }}
runs-on: ubuntu-22.04
strategy:
matrix:
arch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set version
run: |
echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build reproducible binary
run: |
make build-reproducible-${{ matrix.arch }}
- name: Create tarball and checksum
run: |
cd build
tar -czvf bitsongd-${{ env.VERSION }}-linux-${{ matrix.arch }}.tar.gz bitsongd-linux-${{ matrix.arch }}
sha256sum bitsongd-${{ env.VERSION }}-linux-${{ matrix.arch }}.tar.gz > bitsongd-${{ env.VERSION }}-linux-${{ matrix.arch }}.tar.gz.sha256
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
build/bitsongd-${{ env.VERSION }}-linux-${{ matrix.arch }}.tar.gz
build/bitsongd-${{ env.VERSION }}-linux-${{ matrix.arch }}.tar.gz.sha256
build-darwin:
# NOTE: darwin-amd64 disabled until osxcross cross-compilation is implemented
# See: https://github.com/bitsongofficial/internal-docs/blob/main/docs/research/macos-cross-compilation.md
name: Build macOS ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
# - arch: amd64
# runner: macos-15-large # Requires paid runner
# goarch: amd64
- arch: arm64
runner: macos-latest
goarch: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set version
run: |
echo "VERSION=$(git describe --tags | sed 's/^v//')" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Build binary
run: |
GOARCH=${{ matrix.goarch }} LEDGER_ENABLED=true make build
mv build/bitsongd build/bitsongd-darwin-${{ matrix.arch }}
- name: Create tarball and checksum
run: |
cd build
tar -czvf bitsongd-${{ env.VERSION }}-darwin-${{ matrix.arch }}.tar.gz bitsongd-darwin-${{ matrix.arch }}
shasum -a 256 bitsongd-${{ env.VERSION }}-darwin-${{ matrix.arch }}.tar.gz > bitsongd-${{ env.VERSION }}-darwin-${{ matrix.arch }}.tar.gz.sha256
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
build/bitsongd-${{ env.VERSION }}-darwin-${{ matrix.arch }}.tar.gz
build/bitsongd-${{ env.VERSION }}-darwin-${{ matrix.arch }}.tar.gz.sha256
build-windows:
name: Build Windows amd64
runs-on: windows-latest
steps:
- name: Install make
run: choco install make
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set version
run: |
$version = git describe --tags | ForEach-Object { $_ -replace '^v', '' }
echo "VERSION=$version" >> $env:GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Build binary
run: |
make LEDGER_ENABLED=true build
mv build/bitsongd.exe "build/bitsongd-$env:VERSION-windows-amd64.exe"
- name: Create checksum
run: |
cd build
$hash = (Get-FileHash -Algorithm SHA256 "bitsongd-$env:VERSION-windows-amd64.exe").Hash.ToLower()
"$hash bitsongd-$env:VERSION-windows-amd64.exe" | Out-File -Encoding ASCII "bitsongd-$env:VERSION-windows-amd64.exe.sha256"
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
build/bitsongd-${{ env.VERSION }}-windows-amd64.exe
build/bitsongd-${{ env.VERSION }}-windows-amd64.exe.sha256