-
Notifications
You must be signed in to change notification settings - Fork 18
192 lines (167 loc) · 5.23 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
name: Release build
on:
push:
tags:
- 'v*'
env:
LSPD_GO_VERSION: 1.21.0
LND_GO_VERSION: 1.21.0
LND_REF: 0c939786ced78a981bd77c7da628bfcf86ada568
CLN_REF: v23.11.2
jobs:
lspd:
name: Release lspd
runs-on: ubuntu-latest
strategy:
matrix:
os: [
linux,
darwin,
]
arch: [
arm64,
amd64,
]
steps:
- name: git checkout
uses: actions/checkout@v4
- name: setup go ${{ env.LSPD_GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '${{ env.LSPD_GO_VERSION }}'
- name: get commit id
run: |
echo "COMMIT=$(git describe --tags --dirty)" >> $GITHUB_ENV
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: build lspd
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
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}
- name: build cln plugin
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
PKG: github.com/breez/lspd
run: |
go get ${PKG}/cln_plugin/cmd
go build -v -trimpath -o lspd_cln_plugin -ldflags="-s -w -X ${PKG}/build.Commit=${COMMIT} -X ${PKG}/build.CommitHash=${COMMIT_HASH}" ${PKG}/cln_plugin/cmd
- name: upload lspd artifacts
uses: actions/upload-artifact@v4
with:
name: lspd-${{ matrix.os }}-${{ matrix.arch }}
path: |
lspd
lspd_cln_plugin
lnd:
name: Release lnd
runs-on: ubuntu-latest
strategy:
matrix:
os: [
linux,
darwin,
]
arch: [
arm64,
amd64,
]
steps:
- name: Checkout LND for LSP
uses: actions/checkout@v4
with:
repository: breez/lnd
ref: ${{ env.LND_REF }}
- name: setup go ${{ env.LND_GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: '${{ env.LND_GO_VERSION }}'
- name: get commit id
run: |
echo "COMMIT=$(git describe --tags --dirty)" >> $GITHUB_ENV
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: build lnd release
env:
GOEXPERIMENT: loopvar
CGO_ENABLED: 0
GOARCH: ${{ matrix.arch }}
GOOS: ${{ matrix.os }}
PKG: github.com/lightningnetwork/lnd
run: |
go get ${PKG}/cmd/lnd
go get ${PKG}/cmd/lncli
go build -v -trimpath -ldflags="-s -w -X ${PKG}/build.Commit=${COMMIT} -X ${PKG}/build.CommitHash=${COMMIT_HASH}" -tags="submarineswaprpc chanreservedynamic routerrpc walletrpc chainrpc signrpc invoicesrpc" ${PKG}/cmd/lnd
go build -v -trimpath -ldflags="-s -w -X ${PKG}/build.Commit=${COMMIT} -X ${PKG}/build.CommitHash=${COMMIT_HASH}" -tags="submarineswaprpc chanreservedynamic routerrpc walletrpc chainrpc signrpc invoicesrpc" ${PKG}/cmd/lncli
- name: upload lnd artifacts
uses: actions/upload-artifact@v4
with:
name: lnd-${{ matrix.os }}-${{ matrix.arch }}
path: |
lnd
lncli
release:
needs:
- lspd
- lnd
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: create release
uses: ncipollo/release-action
with:
artifacts: *
generateReleaseNotes: true
# cln-macos:
# name: Release lightningd
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [
# macos-13,
# macos-13-xlarge, # this is an arm64 version of macos
# ]
# steps:
# - name: Checkout CLN for LSP
# uses: actions/checkout@v4
# with:
# repository: ElementsProject/lightning
# ref: ${{ env.CLN_REF }}
# - name: Install dependencies
# run: brew install autoconf automake libtool gnu-sed gettext libsodium
# - name: Install Protoc
# uses: arduino/setup-protoc@v2
# with:
# version: "23.4"
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# NOTE: This doesn't directly work, because the
# - name: Silicon env variables
# if: ${{ matrix.os == 'macos-13-xlarge' }}
# run: |
# echo "CPATH=/opt/homebrew/include" >> $GITHUB_ENV
# echo "LIBRARY_PATH=/opt/homebrew/lib" >> $GITHUB_ENV
# - name: Setup Python 3.11
# uses: actions/setup-python@v4
# with:
# python-version: 3.11
# - name: Install Python dependencies
# run: |
# pip3 install --upgrade pip
# pip3 install poetry mako
# - name: Build lightningd
# env:
# HAVE_GOOD_LIBSODIUM: 0
# run: |
# poetry install
# ./configure
# poetry run make -j$(nproc)
# - name: upload cln artifacts
# uses: actions/upload-artifact@v4
# with:
# name: cln-${{ matrix.os }}
# path: |
# lightningd/lightningd
# cli/lightning-cli