Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 36 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,40 @@ jobs:
clients: ${{ steps.detect.outputs.clients }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 2

- name: Detect all clients
id: detect
run: |
ALL_CLIENTS=$(ls -d clients/*/ | xargs -n 1 basename | jq -R -s -c 'split("\n")[:-1]')
echo "Detected all clients: $ALL_CLIENTS"
echo "clients=$ALL_CLIENTS" >> $GITHUB_OUTPUT
ALL_CLIENTS=$(ls -d clients/*/ | xargs -n 1 basename)
CHANGED_CLIENTS=()
PREV_COMMIT=$(git rev-parse HEAD~1)
# Check each client directory for changes
for client in $ALL_CLIENTS; do
if git diff --quiet $PREV_COMMIT HEAD -- clients/$client/; then
echo "No changes detected in $client"
else
CHANGED_CLIENTS+=("$client")
fi
done
if git diff --quiet $PREV_COMMIT HEAD -- common/; then
echo "No changes detected in common"
else
CHANGED_CLIENTS+=("common")
fi
if [ ${#CHANGED_CLIENTS[@]} -eq 0 ]; then
CHANGED_CLIENTS_JSON="[]"
else
CHANGED_CLIENTS_JSON=$(printf '%s\n' "${CHANGED_CLIENTS[@]}" | jq -R -s -c 'split("\n")[:-1]')
fi
echo "Detected changed clients: $CHANGED_CLIENTS_JSON"
echo "clients=$CHANGED_CLIENTS_JSON" >> $GITHUB_OUTPUT
release:
needs: detect-clients
Expand Down Expand Up @@ -82,7 +108,7 @@ jobs:
echo "package_path=./" >> $GITHUB_OUTPUT
else
echo "dir=clients/${{ matrix.client }}" >> $GITHUB_OUTPUT
echo "package_path=./src" >> $GITHUB_OUTPUT
echo "package_path=./" >> $GITHUB_OUTPUT
fi
- name: Set up Go environment
Expand Down Expand Up @@ -147,7 +173,11 @@ jobs:
fi
# Set the full tag name
FULL_TAG="${{ matrix.client }}/$NEW_VERSION"
if [ "${{ matrix.client }}" == "common" ]; then
FULL_TAG="common/$NEW_VERSION"
else
FULL_TAG="clients/${{ matrix.client }}/$NEW_VERSION"
fi
echo "tag=$FULL_TAG" >> $GITHUB_OUTPUT
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
Expand Down
8 changes: 5 additions & 3 deletions common/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
coverage.txt
*.DS_Store
.idea
dist
.env

# IntelliJ
.idea
6 changes: 4 additions & 2 deletions common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.0.0 - 2025-12-15
### Changelog

- Initial release
## 1.0.0 - 2025-12-16

- Initial release
5 changes: 2 additions & 3 deletions common/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ require (
github.com/andybalholm/brotli v1.2.0
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.3
github.com/stretchr/testify v1.11.1
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78
golang.org/x/net v0.47.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/stretchr/testify v1.11.1 // indirect
golang.org/x/crypto v0.44.0 // indirect
golang.org/x/crypto v0.46.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
7 changes: 3 additions & 4 deletions common/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@ github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aN
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM=
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI=
golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU=
golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc=
golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU=
golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0=
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=