From dc7310643438bbde498e49108f59ae2ee485962f Mon Sep 17 00:00:00 2001 From: Sydney Anne Erickson <sydney@elixxir.io> Date: Wed, 9 Nov 2022 17:49:02 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0cba6dff..19033db1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,8 +18,9 @@ before_script: stages: - test - build - - doc-update + - tag - version_check + - doc-update build: stage: build @@ -57,6 +58,15 @@ version_check: - CODEVERS=$(cat utils/version.go | grep "const SEMVER =" | cut -d ' ' -f4 | tr -d '"') - if [[ $GITTAG != $CODEVERS ]]; then echo "VERSION NUMBER BAD $GITTAG != $CODEVER"; exit -1; fi +tag: + stage: build + image: $DOCKER_IMAGE + script: + - git remote add origin_tags git@$GITLAB_SERVER:elixxir/xxdk-wasm.git || true + - GOOS=js GOARCH=wasm go build -ldflags '-w -s' -o release/xxdk.wasm main.go + - git tag $(sha256sum release/xxdk.wasm | awk '{ print $1 }') -f + - git push origin_tags -f --tags + # This pipeline job will attempt to have pkg.go.dev update docs for xxdk-wasm. # # pkg.go.dev relies on the proxy.golang.org service (go module cache/proxy) to discover versions of -- GitLab