From 98b00be241fbbd68033646035b342976cebd9b44 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 15 Oct 2022 20:05:05 -0300 Subject: [PATCH] new musl-based build process. --- .github/workflows/release.yml | 24 ++++++++++++++++-------- README.md | 4 ++-- main.go | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43326c6..9444291 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,14 +24,22 @@ jobs: - make-release strategy: matrix: - goos: [linux, freebsd, openbsd] - goarch: [amd64, arm64] + os: [linux, freebsd] + arch: [amd64, arm64] steps: + - uses: actions/setup-go@v3 + with: + go-version: "1.18" - uses: actions/checkout@v3 - - uses: wangyoucao577/go-release-action@v1.30 + - if: matrix.arch == 'amd64' + run: sudo apt update && sudo apt install -y --no-install-recommends musl-tools + - if: matrix.arch == 'amd64' + run: CC=$(which musl-gcc) GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -ldflags='-s -w -linkmode external -extldflags "-static"' -o ./trustedcoin + - if: matrix.arch == 'arm64' + run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -ldflags='-s -w' -o ./trustedcoin + - run: tar -czf trustedcoin-${{ matrix.os }}-${{ matrix.arch }}.tar.gz trustedcoin + - uses: AButler/upload-release-assets@v2.0 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - goos: ${{ matrix.goos }} - goarch: ${{ matrix.goarch }} - goversion: "1.18" - overwrite: true + files: trustedcoin-${{ matrix.os }}-${{ matrix.arch }}.tar.gz + repo-token: ${{ secrets.GITHUB_TOKEN }} + release-tag: ${{ github.ref_name }} diff --git a/README.md b/README.md index c55ac6d..cb94df4 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ apt install lightningd mkdir -p ~/.lightning/plugins echo 'disable-plugin=bcli' >> .lightning/config cd ~/.lightning/plugins -wget https://github.com/nbd-wtf/trustedcoin/releases/download/v0.5.6/trustedcoin-v0.5.6-linux-amd64.tar.gz -tar -xvf trustedcoin-v0.5.6-linux-amd64.tar.gz +wget https://github.com/nbd-wtf/trustedcoin/releases/download/v0.5.7/trustedcoin-linux-amd64.tar.gz +tar -xvf trustedcoin-v0.5.7-linux-amd64.tar.gz cd lightningd ``` diff --git a/main.go b/main.go index 95fca1c..8b3e26c 100644 --- a/main.go +++ b/main.go @@ -50,7 +50,7 @@ func esploras(network string) (ss []string) { func main() { p := plugin.Plugin{ Name: "trustedcoin", - Version: "v0.5.6", + Version: "v0.5.7", Options: []plugin.Option{ {Name: "bitcoin-rpcconnect", Type: "string", Description: "Hostname (IP) to bitcoind RPC (optional).", Default: ""}, {Name: "bitcoin-rpcport", Type: "string", Description: "Port to bitcoind RPC (optional).", Default: ""},