Skip to content

chore: transfer the validate release script to action #193

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

Merged
merged 4 commits into from
Feb 8, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
enhance format
  • Loading branch information
imbajin authored Feb 8, 2023
commit f7346ce2003d6e42855068e5193c2110979d853e
32 changes: 19 additions & 13 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
name: Validate Apache Release
name: "Validate Apache Release"

on:
workflow_dispatch:
inputs:
release_version:
required: true
default: '1.0.0'
deploy:
required: true
default: false
type: boolean

push:
branches:
- 'release-*'
Expand All @@ -23,8 +20,8 @@ jobs:
env:
SCRIPT_PATH: hugegraph-dist/scripts/
URL_PREFIX: https://dist.apache.org/repos/dist/dev/incubator/hugegraph/
USER: 'Imba Jin'
RELEASE_VERSION: #todo parse version
USER: 'imbajin'
RELEASE_VERSION: '' #todo parse version
steps:
- name: Checkout source
uses: actions/checkout@v3
Expand Down Expand Up @@ -52,11 +49,12 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-

- name: 1.Download SVN Sources
- name: 1. Download SVN Sources
run: |
rm -rf dist/${{ inputs.release_version }} && svn co ${URL_PREFIX}/${{ inputs.release_version }} dist/${{ inputs.release_version }}
cd dist/${{ inputs.release_version }} || exit
- name: 2.Check Environment & Import Public Keys

- name: 2. Check Environment & Import Public Keys
run: |
cd dist/${{ inputs.release_version }}
shasum --version 1>/dev/null || exit
Expand All @@ -73,15 +71,17 @@ jobs:
do
echo -e "5\ny\n" | gpg --batch --command-fd 0 --edit-key "$key" trust
done
- name: 3.Check Sha512 & GPG Signature

- name: 3. Check Sha512 & GPG Signature
run: |
cd dist/${{ inputs.release_version }}
for i in *.tar.gz; do
echo "$i"
shasum -a 512 --check "$i".sha512 || exit
eval gpg "${GPG_OPT}" --verify "$i".asc "$i" || exit
done
- name: 4.Validate Source Packages

- name: 4. Validate Source Packages
run: |
cd dist/${{ inputs.release_version }}
ls -lh ./*.tar.gz
Expand Down Expand Up @@ -116,15 +116,17 @@ jobs:
mvn package -DskipTests -ntp && ls -lh
cd .. || exit
done
- name: 5.Run Compiled Packages In Server

- name: 5. Run Compiled Packages In Server
run: |
cd dist/${{ inputs.release_version }}
ls -lh
cd ./*hugegraph-incubating*src/*hugegraph*${{ inputs.release_version }} || exit
bin/init-store.sh && sleep 1
bin/start-hugegraph.sh && ls ../../
cd ../../ || exit
- name: 6.Run Compiled Packages In ToolChain(Loader/Tool/Hubble)

- name: 6. Run Compiled Packages In ToolChain(Loader/Tool/Hubble)
run: |
cd dist/${{ inputs.release_version }}
cd ./*toolchain*src || exit
Expand All @@ -147,6 +149,7 @@ jobs:
cat conf/hugegraph-hubble.properties && bin/start-hubble.sh
cd ../../../ || exit
rm -rf ./*src* && ls -lh

- name: 7.Validate Binary Packages(Check NOTICE & LICENSE file)
run: |
cd dist/${{ inputs.release_version }}
Expand All @@ -172,6 +175,7 @@ jobs:
fi
cd - || exit
done

- name: 8.Validate Binary Packages(Start Server)
run: |
cd dist/${{ inputs.release_version }}
Expand All @@ -181,6 +185,7 @@ jobs:
jps | grep HugeGraphServer | awk '{print $1}' | xargs kill -9
bin/start-hugegraph.sh && ls ../
cd - || exit

- name: 9.Validate Binary Packages(Start ToolChain(Loader/Tool/Hubble))
run: |
cd dist/${{ inputs.release_version }}
Expand All @@ -204,6 +209,7 @@ jobs:
cat conf/hugegraph-hubble.properties
bin/stop-hubble.sh && bin/start-hubble.sh
cd - || exit

strategy:
fail-fast: false
matrix:
Expand Down