Replacement to v1.0.0 #407
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
name: build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
LD_LIBRARY_PATH: /home/runner/work/ksot/ksot/nb-server/lib | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
env: | |
GO_VERSION: 1.21 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: bulid libyang | |
run: | | |
cd nb-server/libyang | |
mkdir build; cd build | |
echo "/home/runner/work/ksot/ksot/nb-server/bin" >> $GITHUB_PATH | |
cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/runner/work/ksot/ksot/nb-server .. | |
make | |
make install | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Test nb-server | |
run: | | |
cd nb-server | |
go test ./... | |
- name: Test github-server | |
run: | | |
cd github-server | |
go test ./... | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: latest | |
args: release --snapshot --clean |