Skip to content

Commit

Permalink
set commit hash in itests
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Feb 2, 2024
1 parent 0b31d8c commit 25c94e2
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions .github/actions/build-lspd/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,35 @@ description: 'Build LSPD and upload the build artifacts.'
runs:
using: 'composite'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: git checkout
uses: actions/checkout@v4

- name: Build LSPD
- name: get commit id
run: |
go get github.com/breez/lspd
go get github.com/breez/lspd/cln_plugin
go build .
go build -o lspd_plugin ./cln_plugin/cmd
echo "COMMIT=$(git describe --tags --dirty)" >> $GITHUB_ENV
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
shell: bash

- name: Upload build artifacts
uses: actions/upload-artifact@v3
- name: build lspd
env:
PKG: github.com/breez/lspd
run: |
go get ${PKG}
go build -v -trimpath -o lspd -ldflags "-s -w -X ${PKG}/build.Commit=${COMMIT} -X ${PKG}/build.CommitHash=${COMMIT_HASH}" ${PKG}
shell: bash

- name: build cln plugin
env:
PKG: github.com/breez/lspd
run: |
go get ${PKG}/cln_plugin/cmd
go build -v -trimpath -o lspd_plugin -ldflags="-s -w -X ${PKG}/build.Commit=${COMMIT} -X ${PKG}/build.CommitHash=${COMMIT_HASH}" ${PKG}/cln_plugin/cmd
shell: bash

- name: upload lspd artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
./lspd
./lspd_plugin
lspd
lspd_plugin

0 comments on commit 25c94e2

Please sign in to comment.