Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): publish weaver go modules #2415

Merged
merged 1 commit into from
May 9, 2023
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
60 changes: 37 additions & 23 deletions .github/workflows/test_weaver-pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,26 +130,40 @@ jobs:
working-directory: weaver/core/relay

# GO
# - name: check weaver/common/protos-go/VERSION
# run: cat VERSION | grep $VERSION || exit 1
# working-directory: weaver/common/protos-go
#
# - name: check weaver/core/network/fabric-interop-cc/libs/utils/VERSION
# run: cat VERSION | grep $VERSION || exit 1
# working-directory: weaver/core/network/fabric-interop-cc/libs/utils
#
# - name: check weaver/core/network/fabric-interop-cc/libs/assetexchange/VERSION
# run: cat VERSION | grep $VERSION || exit 1
# working-directory: weaver/core/network/fabric-interop-cc/libs/assetexchange
#
# - name: check weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/VERSION
# run: cat VERSION | grep $VERSION || exit 1
# working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt
#
# - name: check weaver/core/network/fabric-interop-cc/contracts/interop/VERSION
# run: cat VERSION | grep $VERSION || exit 1
# working-directory: weaver/core/network/fabric-interop-cc/contracts/interop
#
# - name: check weaver/sdks/fabric/go-sdk/VERSION
# run: cat VERSION | grep $VERSION || exit 1
# working-directory: weaver/sdks/fabric/go-sdk
- name: check weaver/common/protos-go/VERSION
run: cat VERSION | grep $VERSION || exit 1
working-directory: weaver/common/protos-go

- name: check weaver/core/network/fabric-interop-cc/libs/utils/VERSION
run: cat VERSION | grep $VERSION || exit 1
working-directory: weaver/core/network/fabric-interop-cc/libs/utils

- name: check weaver/core/network/fabric-interop-cc/libs/assetexchange/VERSION
run: cat VERSION | grep $VERSION || exit 1
working-directory: weaver/core/network/fabric-interop-cc/libs/assetexchange

- name: check weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt/VERSION
run: cat VERSION | grep $VERSION || exit 1
working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt

- name: check weaver/core/network/fabric-interop-cc/contracts/interop/VERSION
run: cat VERSION | grep $VERSION || exit 1
working-directory: weaver/core/network/fabric-interop-cc/contracts/interop

- name: check weaver/sdks/fabric/go-sdk/VERSION
run: cat VERSION | grep $VERSION || exit 1
working-directory: weaver/sdks/fabric/go-sdk

test_weaver_go_pre-release:
needs: check_release
if: needs.check_release.outputs.status == 'continue'
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3.1.0

- name: Update GO Checksum
run: sh go-gen-checksum.sh

- name: Check if changes are committed
run: (git status | grep "nothing to commit, working tree clean") || (echo "go-gen-checksum not called before release commit" && exit 1)
20 changes: 16 additions & 4 deletions .github/workflows/weaver_deploy_corda-pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
sed -i "s#version=.*#version=${VERSION}#g" gradle.properties
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
sed -i "s#version=.*#version=${VERSION}#g" gradle.properties
fi
cat gradle.properties
working-directory: weaver/common/protos-java-kt

Expand Down Expand Up @@ -98,7 +101,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
sed -i "s#version=.*#version=${VERSION}#g" gradle.properties
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
sed -i "s#version=.*#version=${VERSION}#g" gradle.properties
fi
cat gradle.properties
working-directory: weaver/core/network/corda-interop-app

Expand Down Expand Up @@ -147,7 +153,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
sed -i "s#version=.*#version=${VERSION}#g" gradle.properties
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
sed -i "s#version=.*#version=${VERSION}#g" gradle.properties
fi
cat gradle.properties
working-directory: weaver/sdks/corda

Expand Down Expand Up @@ -197,7 +206,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo -n $VERSION > VERSION
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
echo -n $VERSION > VERSION
fi
cat VERSION
working-directory: weaver/core/drivers/corda-driver

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ name: Deploy Go Modules

on:
push:
branches:
- main
paths:
- 'common/protos-go/VERSION'
- 'core/network/fabric-interop-cc/libs/utils/VERSION'
- 'core/network/fabric-interop-cc/libs/assetexchange/VERSION'
- 'core/network/fabric-interop-cc/interfaces/asset-mgmt/VERSION'
- 'core/network/fabric-interop-cc/contracts/interop/VERSION'
- 'sdks/fabric/go-sdk/VERSION'
# branches:
# - main
# paths:
# - 'common/protos-go/VERSION'
# - 'core/network/fabric-interop-cc/libs/utils/VERSION'
# - 'core/network/fabric-interop-cc/libs/assetexchange/VERSION'
# - 'core/network/fabric-interop-cc/interfaces/asset-mgmt/VERSION'
# - 'core/network/fabric-interop-cc/contracts/interop/VERSION'
# - 'sdks/fabric/go-sdk/VERSION'
tags:
- v*

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -35,6 +37,18 @@ jobs:
echo "MODULE_TAG=common/protos-go" >> $GITHUB_ENV
echo "MODULE_DESC=GO Weaver Protos" >> $GITHUB_ENV

- name: Update version
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
echo -n $VERSION > VERSION
fi
cat VERSION
working-directory: weaver/common/protos-go

- name: Set module version
run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV
working-directory: weaver/common/protos-go
Expand Down Expand Up @@ -85,6 +99,18 @@ jobs:
echo "MODULE_TAG=core/network/fabric-interop-cc/libs/utils" >> $GITHUB_ENV
echo "MODULE_DESC=GO Fabric Utils Library for Interoperation" >> $GITHUB_ENV

- name: Update version
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
echo -n $VERSION > VERSION
fi
cat VERSION
working-directory: weaver/core/network/fabric-interop-cc/libs/utils

- name: Set module version
run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV
working-directory: weaver/core/network/fabric-interop-cc/libs/utils
Expand Down Expand Up @@ -139,6 +165,18 @@ jobs:
echo "MODULE_TAG=core/network/fabric-interop-cc/libs/assetexchange" >> $GITHUB_ENV
echo "MODULE_DESC=GO Fabric Library for Asset Exchange" >> $GITHUB_ENV

- name: Update version
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
echo -n $VERSION > VERSION
fi
cat VERSION
working-directory: weaver/core/network/fabric-interop-cc/libs/assetexchange

- name: Set module version
run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV
working-directory: weaver/core/network/fabric-interop-cc/libs/assetexchange
Expand Down Expand Up @@ -193,6 +231,18 @@ jobs:
echo "MODULE_TAG=core/network/fabric-interop-cc/interfaces/asset-mgmt" >> $GITHUB_ENV
echo "MODULE_DESC=GO Fabric Asset Management Interface" >> $GITHUB_ENV

- name: Update version
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
echo -n $VERSION > VERSION
fi
cat VERSION
working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt

- name: Set module version
run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV
working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt
Expand Down Expand Up @@ -247,6 +297,18 @@ jobs:
echo "MODULE_TAG=core/network/fabric-interop-cc/contracts/interop" >> $GITHUB_ENV
echo "MODULE_DESC=GO Fabric Interop Chaincode" >> $GITHUB_ENV

- name: Update version
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
echo -n $VERSION > VERSION
fi
cat VERSION
working-directory: weaver/core/network/fabric-interop-cc/contracts/interop

- name: Set module version
run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV
working-directory: weaver/core/network/fabric-interop-cc/contracts/interop
Expand Down Expand Up @@ -300,6 +362,18 @@ jobs:
run: |
echo "MODULE_TAG=sdks/fabric/go-sdk" >> $GITHUB_ENV
echo "MODULE_DESC=GO Fabric Weaver SDK" >> $GITHUB_ENV

- name: Update version
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
echo -n $VERSION > VERSION
fi
cat VERSION
working-directory: weaver/sdks/fabric/go-sdk

- name: Set module version
run: echo "VERSION=v$(cat VERSION)" >> $GITHUB_ENV
Expand Down
25 changes: 20 additions & 5 deletions .github/workflows/weaver_deploy_node-pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
sed -i "s#\"version\":.*#\"version\": \"${VERSION}\"#g" package.json
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
sed -i "s#\"version\":.*#\"version\": \"${VERSION}\"#g" package.json
fi
head -4 package.json
working-directory: weaver/common/protos-js

Expand Down Expand Up @@ -110,7 +113,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
sed -i "s#\"version\":.*#\"version\": \"${VERSION}\"#g" package.json
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
sed -i "s#\"version\":.*#\"version\": \"${VERSION}\"#g" package.json
fi
head -4 package.json
working-directory: weaver/sdks/fabric/interoperation-node-sdk

Expand Down Expand Up @@ -164,7 +170,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
sed -i "s#\"version\":.*#\"version\": \"${VERSION}\"#g" package.json
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
sed -i "s#\"version\":.*#\"version\": \"${VERSION}\"#g" package.json
fi
head -4 package.json
working-directory: weaver/sdks/besu/node

Expand Down Expand Up @@ -220,7 +229,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo -n $VERSION > VERSION
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
echo -n $VERSION > VERSION
fi
cat VERSION
working-directory: weaver/core/drivers/fabric-driver

Expand Down Expand Up @@ -269,7 +281,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo -n $VERSION > VERSION
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
echo -n $VERSION > VERSION
fi
cat VERSION
working-directory: weaver/core/identity-management/iin-agent

Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/weaver_deploy_relay-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
sed -i "s#^version\s*=.*#version = ${VERSION}#g" Cargo.toml
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
sed -i "s#^version\s*=.*#version = ${VERSION}#g" Cargo.toml
fi
head -4 Cargo.toml
working-directory: weaver/common/protos-rs/pkg

Expand Down Expand Up @@ -75,7 +78,10 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo -n $VERSION > VERSION
echo $VERSION
if [[ $VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+[A-Za-z\-]*$ ]]; then
echo -n $VERSION > VERSION
fi
cat VERSION
working-directory: weaver/core/relay

Expand Down
Loading