Debian Codegraph @

.github/workflows/build-test.yaml

raw symbols SCIP
1 on:
2 push:
3 branches-ignore:
4 - master
5 - main
6 pull_request:
7 branches:
8 - master
9 - main
10 name: Build Test
11 jobs:
12 publish:
13 strategy:
14 matrix:
15 os:
16 - linux
17 - darwin
18 - windows
19 arch:
20 - amd64
21 - 386
22 - arm64
23 - arm
24 include:
25 - os: linux
26 arch: amd64
27 artifact_name: dasel_linux_amd64
28 test_version: true
29 test_execution: true
30 - os: linux
31 arch: 386
32 artifact_name: dasel_linux_386
33 test_version: false
34 test_execution: false
35 - os: darwin
36 arch: amd64
37 artifact_name: dasel_darwin_amd64
38 test_version: false
39 test_execution: false
40 - os: darwin
41 arch: arm64
42 artifact_name: dasel_darwin_arm64
43 test_version: false
44 test_execution: false
45 - os: windows
46 arch: amd64
47 artifact_name: dasel_windows_amd64.exe
48 test_version: false
49 test_execution: false
50 - os: windows
51 arch: 386
52 artifact_name: dasel_windows_386.exe
53 test_version: false
54 test_execution: false
55 - os: linux
56 arch: arm64
57 artifact_name: dasel_linux_arm64
58 test_version: false
59 test_execution: false
60 - os: linux
61 arch: arm
62 artifact_name: dasel_linux_arm32
63 test_version: false
64 test_execution: false
65 exclude:
66 - os: darwin
67 arch: 386
68 - os: windows
69 arch: arm64
70 - os: windows
71 arch: arm
72 - os: darwin
73 arch: arm
74 name: Dev build ${{ matrix.os }} ${{ matrix.arch }}
75 runs-on: ubuntu-latest
76 steps:
77 - uses: actions/checkout@v6
78 - uses: actions/setup-go@v6
79 with:
80 go-version: '^1.25.0' # The Go version to download (if necessary) and use.
81 - name: Set env
82 run: echo RELEASE_VERSION=development >> $GITHUB_ENV
83 - name: Build
84 run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} CGO_ENABLED=0 go build -o target/release/${{ matrix.artifact_name }} -ldflags="-w -s -X 'github.com/tomwright/dasel/v3/internal.Version=${{ env.RELEASE_VERSION }}'" ./cmd/dasel
85 - name: Test version
86 if: matrix.test_version == true
87 run: ./target/release/${{ matrix.artifact_name }} version
88 - name: Test execution
89 if: matrix.test_execution == true
90 run: |
91 echo '{"hello": "World"}' | ./target/release/${{ matrix.artifact_name }} -i json 'hello'