Skip to content

Commit 15a7072

Browse files
Merge pull request #9 from evilmonkeyinc/fix/pipeline
fix: push to main workflow updates
2 parents 037ad50 + ae14ac6 commit 15a7072

File tree

5 files changed

+40
-7
lines changed

5 files changed

+40
-7
lines changed

.github/workflows/push_main.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,40 @@ jobs:
7272
release:
7373
runs-on: ubuntu-latest
7474
needs: [test, lint]
75+
outputs:
76+
version: ${{ steps.release.outputs.version }}
7577
steps:
7678
- uses: actions/checkout@master
7779
- uses: go-semantic-release/action@v1
80+
id: release
7881
with:
7982
github-token: ${{ secrets.GITHUB_TOKEN }}
8083
allow-initial-development-versions: true
8184
force-bump-patch-version: true
85+
build:
86+
if: needs.release.outputs.version != ''
87+
needs: [release]
88+
runs-on: ubuntu-latest
89+
strategy:
90+
matrix:
91+
goos: [linux, windows, darwin]
92+
goarch: ["386", amd64, arm64]
93+
goversion: ["1.17"]
94+
exclude:
95+
- goarch: "386"
96+
goos: darwin
97+
- goarch: "386"
98+
goos: windows
99+
- goarch: arm64
100+
goos: windows
101+
steps:
102+
- uses: actions/checkout@v2
103+
- uses: wangyoucao577/go-release-action@v1.22
104+
with:
105+
github_token: ${{ secrets.GITHUB_TOKEN }}
106+
goos: ${{ matrix.goos }}
107+
goarch: ${{ matrix.goarch }}
108+
goversion: ${{ matrix.goversion }}
109+
project_path: "./cmd/"
110+
binary_name: "jsonpath"
111+
ldflags: -X "main.Command=jsonpath" -X "main.Version=${{ needs.release.outputs.version }}" -X "main.OS=${{ matrix.goos }}" -X "main.Arch=${{ matrix.goarch }}"

.github/workflows/release-build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: Release Build
1+
name: Manual Release Build
22
on:
33
release:
4-
types: [published]
4+
types: [created]
55
workflow_dispatch:
66

77
jobs:

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![codecov](https://codecov.io/gh/evilmonkeyinc/jsonpath/branch/main/graph/badge.svg?token=4PU85I7J2R)](https://codecov.io/gh/evilmonkeyinc/jsonpath)
2-
[![main](https://github.com/evilmonkeyinc/jsonpath/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/evilmonkeyinc/jsonpath/actions/workflows/test.yaml)
2+
[![Push Main](https://github.com/evilmonkeyinc/jsonpath/actions/workflows/push_main.yaml/badge.svg?branch=main)](https://github.com/evilmonkeyinc/jsonpath/actions/workflows/push_main.yaml)
33
[![Go Reference](https://pkg.go.dev/badge/github.com/evilmonkeyinc/jsonpath.svg)](https://pkg.go.dev/github.com/evilmonkeyinc/jsonpath)
44

55
> This library is on the unstable version v0.X.X, which means there is a chance that any minor update may introduce a breaking change. Where I will endeavor to avoid this, care should be taken updating your dependency on this library until the first stable release v1.0.0 at which point any future breaking changes will result in a new major release.
@@ -219,5 +219,8 @@ For strings instead of returning an array of characters instead will return a su
219219

220220
The [original specification for JSONPath](https://goessner.net/articles/JsonPath/) was proposed in 2007, and was a programing challenge I had not attempted before while being a practical tool.
221221

222+
## Hows does this compare to...
223+
222224
There are many [implementations](https://cburgmer.github.io/json-path-comparison/) in multiple languages so I will not claim that this library is better in any way but I believe that it is true to the original specification and was an enjoyable challenge.
223225

226+
Sample queries and the expected response for this implementation compared to the community consensus are available [here](test/README.md)

test/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# cburgmer tests
1+
# Consensus Tests
22

3-
This test package has tests detailed by https://cburgmer.github.io/json-path-comparison/ comparison matrix which details the community consensus on the expected response from multiple JSONPath queries
3+
This test package has tests detailed by https://cburgmer.github.io/json-path-comparison/ comparison matrix which details the community consensus on the expected response from multiple JSONPath queries by various implementations.
44

55
This implementation would be closer to the 'Scalar consensus' as it does not always return an array, but instead can return a single item when that is expected.
66

test/helper_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ func batchTest(t *testing.T, tests []testData) {
5151

5252
func Test_generateReadme(t *testing.T) {
5353

54-
header := `# cburgmer tests
54+
header := `# Consensus Tests
5555
56-
This test package has tests detailed by https://cburgmer.github.io/json-path-comparison/ comparison matrix which details the community consensus on the expected response from multiple JSONPath queries
56+
This test package has tests detailed by https://cburgmer.github.io/json-path-comparison/ comparison matrix which details the community consensus on the expected response from multiple JSONPath queries by various implementations.
5757
5858
This implementation would be closer to the 'Scalar consensus' as it does not always return an array, but instead can return a single item when that is expected.
5959
`

0 commit comments

Comments
 (0)