Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
fix(ci): update GoReleaser v2 config and google-services.json handling in release workflow
Antonio Ojea166ec53f81a2
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 889828a5..4460ca12 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -34,6 +34,9 @@ jobs:with:channel: 'stable'- name: Build Mobile App+ env:+ GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}+ GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}run: make mobile-app-apk- name: Run GoReleaseruses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3diff --git a/.goreleaser.yaml b/.goreleaser.yamlindex ecff677a..a6b90f82 100644--- a/.goreleaser.yaml+++ b/.goreleaser.yaml@@ -1,4 +1,4 @@-version: 1+version: 2project_name: sambuilds:- id: sam-node@@ -86,7 +86,8 @@ builds:ldflags:- -s -warchives:- - format: tar.gz+ - formats:+ - tar.gzname_template: >-{{ .ProjectName }}_{{- title .Os }}_@@ -96,4 +97,5 @@ archives:{{- if .Arm }}v{{ .Arm }}{{ end }}format_overrides:- goos: windows- format: zip+ formats:+ - zipdiff --git a/Makefile b/Makefileindex 422a3e85..14c0272f 100644--- a/Makefile+++ b/Makefile@@ -64,10 +64,18 @@ mobile-app-apk: mobile-ffi-android@if [ -n "$$GOOGLE_SERVICES_JSON" ]; then \echo "Decoding google-services.json from GOOGLE_SERVICES_JSON environment variable..."; \echo "$$GOOGLE_SERVICES_JSON" | base64 --decode > mobile/sam-node-app/android/app/google-services.json; \+ elif [ -n "$$GOOGLE_SERVICES_JSON_BASE64" ]; then \+ echo "Decoding google-services.json from GOOGLE_SERVICES_JSON_BASE64 environment variable..."; \+ echo "$$GOOGLE_SERVICES_JSON_BASE64" | base64 --decode > mobile/sam-node-app/android/app/google-services.json; \elif [ ! -f mobile/sam-node-app/android/app/google-services.json ]; then \- echo "Error: google-services.json is missing."; \- echo "Please set GOOGLE_SERVICES_JSON environment variable with the base64-encoded configuration, or place the file directly at mobile/sam-node-app/android/app/google-services.json"; \- exit 1; \+ if [ -f mobile/sam-node-app/android/app/google-services.json.tmpl ]; then \+ echo "Copying google-services.json from template..."; \+ cp mobile/sam-node-app/android/app/google-services.json.tmpl mobile/sam-node-app/android/app/google-services.json; \+ else \+ echo "Error: google-services.json is missing."; \+ echo "Please set GOOGLE_SERVICES_JSON or GOOGLE_SERVICES_JSON_BASE64 environment variable with the base64-encoded configuration, or place the file directly at mobile/sam-node-app/android/app/google-services.json"; \+ exit 1; \+ fi; \fimkdir -p mobile/sam-node-app/android/app/src/main/jniLibs/arm64-v8acp "$(OUT_DIR)/android/libsam.so" mobile/sam-node-app/android/app/src/main/jniLibs/arm64-v8a/libsam.so@@ -77,10 +85,18 @@ mobile-app-apk-emulator: mobile-ffi-android-x86_64@if [ -n "$$GOOGLE_SERVICES_JSON" ]; then \echo "Decoding google-services.json from GOOGLE_SERVICES_JSON environment variable..."; \echo "$$GOOGLE_SERVICES_JSON" | base64 --decode > mobile/sam-node-app/android/app/google-services.json; \+ elif [ -n "$$GOOGLE_SERVICES_JSON_BASE64" ]; then \+ echo "Decoding google-services.json from GOOGLE_SERVICES_JSON_BASE64 environment variable..."; \+ echo "$$GOOGLE_SERVICES_JSON_BASE64" | base64 --decode > mobile/sam-node-app/android/app/google-services.json; \elif [ ! -f mobile/sam-node-app/android/app/google-services.json ]; then \- echo "Error: google-services.json is missing."; \- echo "Please set GOOGLE_SERVICES_JSON environment variable with the base64-encoded configuration, or place the file directly at mobile/sam-node-app/android/app/google-services.json"; \- exit 1; \+ if [ -f mobile/sam-node-app/android/app/google-services.json.tmpl ]; then \+ echo "Copying google-services.json from template..."; \+ cp mobile/sam-node-app/android/app/google-services.json.tmpl mobile/sam-node-app/android/app/google-services.json; \+ else \+ echo "Error: google-services.json is missing."; \+ echo "Please set GOOGLE_SERVICES_JSON or GOOGLE_SERVICES_JSON_BASE64 environment variable with the base64-encoded configuration, or place the file directly at mobile/sam-node-app/android/app/google-services.json"; \+ exit 1; \+ fi; \fimkdir -p mobile/sam-node-app/android/app/src/main/jniLibs/x86_64cp "$(OUT_DIR)/android-x86_64/libsam.so" mobile/sam-node-app/android/app/src/main/jniLibs/x86_64/libsam.so