diff --git a/.github/workflows/studio-rpm-package.yml b/.github/workflows/studio-rpm-package.yml index cd346438..e010a3c0 100644 --- a/.github/workflows/studio-rpm-package.yml +++ b/.github/workflows/studio-rpm-package.yml @@ -35,6 +35,6 @@ jobs: - name: Package run: bash ./source/nebula-graph-studio/scripts/rpm-package.sh ${{ secrets.GA_ID }} - name: Upload oss - run: cd ./source/nebula-graph-studio/tmp/ && ossutil64 -e ${{ secrets.OSS_ENDPOINT }} -i ${{ secrets.OSS_ID }} -k ${{ secrets.OSS_SECRET }} -f cp ./ ${{ secrets.OSS_URL }} --include "nebula-graph-studio-*.rpm*" --only-current-dir -r + run: bash ./source/nebula-graph-studio/scripts/rpm-upload.sh ${{ secrets.OSS_ENDPOINT }} ${{ secrets.OSS_ID }} ${{ secrets.OSS_SECRET }} ${{ secrets.OSS_URL }} diff --git a/.github/workflows/studio-tar-package.yml b/.github/workflows/studio-tar-package.yml index 0c6acb1e..e526eed3 100644 --- a/.github/workflows/studio-tar-package.yml +++ b/.github/workflows/studio-tar-package.yml @@ -37,6 +37,6 @@ jobs: - name: Package run: bash ./source/nebula-graph-studio/scripts/tar-package.sh ${{ secrets.GA_ID }} - name: Upload to OSS - run: ls -a & ossutil64 -e ${{ secrets.OSS_ENDPOINT }} -i ${{ secrets.OSS_ID }} -k ${{ secrets.OSS_SECRET }} -f cp ./ ${{ secrets.OSS_URL }} --include "nebula-graph-studio-*.tar.gz" --only-current-dir -r + run: bash ./source/nebula-graph-studio/scripts/tar-upload.sh ${{ secrets.OSS_ENDPOINT }} ${{ secrets.OSS_ID }} ${{ secrets.OSS_SECRET }} ${{ secrets.OSS_URL }} diff --git a/scripts/rpm-upload.sh b/scripts/rpm-upload.sh new file mode 100644 index 00000000..28cd112c --- /dev/null +++ b/scripts/rpm-upload.sh @@ -0,0 +1,8 @@ +set -ex + +DIR=`pwd` +STUDIO=$DIR/source/nebula-graph-studio +cd $STUDIO +VERSION=`cat package.json | grep '"version":' | awk 'NR==1{print $2}' | awk -F'"' '{print $2}'` +cd $STUDIO/tmp/ +ossutil64 -e $1 -i $2 -k $3 -f cp ./ $4${VERSION} --include "nebula-graph-studio-*.rpm*" --only-current-dir -r \ No newline at end of file diff --git a/scripts/tar-upload.sh b/scripts/tar-upload.sh new file mode 100644 index 00000000..21eb4267 --- /dev/null +++ b/scripts/tar-upload.sh @@ -0,0 +1,8 @@ +set -ex + +DIR=`pwd` +STUDIO=$DIR/source/nebula-graph-studio +cd $STUDIO +VERSION=`cat package.json | grep '"version":' | awk 'NR==1{print $2}' | awk -F'"' '{print $2}'` +cd $DIR +ossutil64 -e $1 -i $2 -k $3 -f cp ./ $4${VERSION} --include "nebula-graph-studio-*.tar.gz" --only-current-dir -r \ No newline at end of file