From 3a95a2b0006a6d19c1cba39595de8b9940ca17eb Mon Sep 17 00:00:00 2001 From: bigboateng Date: Sat, 1 Aug 2026 09:55:36 +0100 Subject: [PATCH] fix: publish verifiable Go and Rust packages --- .github/workflows/private-registry.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/private-registry.yml b/.github/workflows/private-registry.yml index e473273..b469379 100644 --- a/.github/workflows/private-registry.yml +++ b/.github/workflows/private-registry.yml @@ -77,19 +77,22 @@ jobs: - name: Publish Go module run: | set -euo pipefail + version="${{ steps.version.outputs.version }}" if gcloud artifacts versions describe "v${{ steps.version.outputs.version }}" \ --project="${{ vars.AR_PROJECT }}" --location="${{ vars.AR_LOCATION }}" \ --repository="${{ vars.AR_GO_REPO }}" --package=github.com/operatorstack/yield \ >/dev/null 2>&1; then echo "Go module already published." else + source_dir="$(mktemp -d)" + git archive "v${version}" | tar -x -C "$source_dir" gcloud artifacts go upload \ --project="${{ vars.AR_PROJECT }}" \ --location="${{ vars.AR_LOCATION }}" \ --repository="${{ vars.AR_GO_REPO }}" \ --module-path=github.com/operatorstack/yield \ - --version="v${{ steps.version.outputs.version }}" \ - --source=. + --version="v${version}" \ + --source="$source_dir" fi - name: Publish TypeScript SDK @@ -142,10 +145,10 @@ jobs: jq -nc --arg vers "$version" --arg cksum "$checksum" '{ name:"yieldskill",vers:$vers, deps:[ - {name:"hex",req:"^0.4",features:[],optional:false,default_features:true,target:null,kind:"normal",registry:null}, - {name:"serde",req:"^1",features:["derive"],optional:false,default_features:true,target:null,kind:"normal",registry:null}, - {name:"serde_json",req:"^1",features:[],optional:false,default_features:true,target:null,kind:"normal",registry:null}, - {name:"sha2",req:"^0.10",features:[],optional:false,default_features:true,target:null,kind:"normal",registry:null} + {name:"hex",req:"^0.4",features:[],optional:false,default_features:true,target:null,kind:"normal",registry:"https://github.com/rust-lang/crates.io-index"}, + {name:"serde",req:"^1",features:["derive"],optional:false,default_features:true,target:null,kind:"normal",registry:"https://github.com/rust-lang/crates.io-index"}, + {name:"serde_json",req:"^1",features:[],optional:false,default_features:true,target:null,kind:"normal",registry:"https://github.com/rust-lang/crates.io-index"}, + {name:"sha2",req:"^0.10",features:[],optional:false,default_features:true,target:null,kind:"normal",registry:"https://github.com/rust-lang/crates.io-index"} ], cksum:$cksum,features:{},yanked:false,links:null }' >> yieldskill-index.json