bump ledger deps (#227) #12
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
# Special thanks to @RiccardoM (https://github.com/riccardoM) | |
# https://github.com/desmos-labs/desmos/blob/master/.github/workflows/release.yml | |
name: Release | |
# Release workflow builds the binaries for a release, and then publishes them to a newly created GitHub release. | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Setup Go 🧰 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.18 | |
- name: Unshallow | |
run: git fetch --prune --unshallow --tags --force | |
- name: Create release 📜 | |
uses: goreleaser/[email protected] | |
with: | |
args: release --rm-dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-macos: | |
name: Build MacOS binary | |
runs-on: macos-10.15 | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Unshallow | |
run: git fetch --prune --unshallow --tags --force | |
- name: Set variables | |
run: | | |
echo "VERSION=$(git describe --always | sed 's/^v//')" >> $GITHUB_ENV | |
- name: Setup Go 🧰 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.18 | |
- name: Build the binary 🏭 | |
run: | | |
LEDGER_ENABLED=true make build | |
mv build/bitsongd "build/bitsongd-$VERSION-darwin-amd64" | |
- name: Upload the artifacts 📤 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "darwin-amd64" | |
path: "build/*darwin*amd64*" | |
build-linux: | |
name: Build Linux binaries | |
runs-on: ubuntu-18.04 | |
strategy: | |
matrix: | |
go-arch: ["amd64", "arm64"] | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Fetch tags | |
run: git fetch --prune --unshallow --tags --force | |
- name: Set variables | |
run: | | |
echo "VERSION=$(git describe --always | sed 's/^v//')" >> $GITHUB_ENV | |
- name: Setup Go 🧰 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.18 | |
- name: Compute diff 📜 | |
uses: technote-space/[email protected] | |
id: git_diff | |
with: | |
PATTERNS: | | |
**/**.go | |
go.mod | |
go.sum | |
- name: Build 🔨 | |
run: | | |
GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=true make build | |
mv build/bitsongd "build/bitsongd-$VERSION-linux-${{ matrix.go-arch }}" | |
- name: Upload the linux/amd64 artifact 📤 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "linux-amd64" | |
path: "build/*linux*amd64*" | |
- name: Upload the linux/arm64 artifact 📤 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "linux-arm64" | |
path: "build/*linux*arm64*" | |
build-windows: | |
name: Build Windows binary | |
runs-on: windows-latest | |
steps: | |
- name: Setting up dependencies | |
run: | | |
choco install make | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Fetch tags | |
run: git fetch --prune --unshallow --tags --force | |
- name: Set variables | |
run: | | |
Add-Content -Path $env:GITHUB_ENV -Value "VERSION=$(git describe --always | sed 's/^v//')" | |
- name: Setup Go 🧰 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.18 | |
- name: Build the binary 🏭 | |
run: | | |
make LEDGER_ENABLED=true build | |
echo "build/bitsongd-$env:VERSION-$env:COMMIT-windows-amd64.exe" | |
mv build/bitsongd.exe "build/bitsongd-$env:VERSION-windows-amd64.exe" | |
- name: Upload the artifacts 📤 | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "windows-amd64" | |
path: "build/*windows*amd64*" |