diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml new file mode 100644 index 0000000..4cdaa26 --- /dev/null +++ b/.github/workflows/_test.yml @@ -0,0 +1,20 @@ +name: Test + +on: + workflow_call: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' + + - name: Test + run: go test -v ./... diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ab2620e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build + +on: [ push ] + +jobs: + run-test: + uses: ./.github/workflows/_test.yml + + build: + runs-on: ubuntu-latest + needs: run-test + + strategy: + matrix: + goos: [ linux ] + goarch: [ amd64, arm64 ] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.23' + + - name: Build + run: | + mkdir -p dist + GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o dist/go-jwt-kc-${{ matrix.goos }}-${{ matrix.goarch }} + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: go-jwt-kc-${{ matrix.goos }}-${{ matrix.goarch }} + path: dist/ \ No newline at end of file diff --git a/go-jwt-kc.plugin.go b/go-jwt-kc.plugin.go index 27cd4dd..8822988 100644 --- a/go-jwt-kc.plugin.go +++ b/go-jwt-kc.plugin.go @@ -11,7 +11,7 @@ import ( "strings" ) -const PluginVersion = "0.1" +const PluginVersion = "0.0.1" var PluginPriority = 1005