-
Notifications
You must be signed in to change notification settings - Fork 6
61 lines (51 loc) · 2 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Release
on:
push:
branches:
- main
tags:
- v*
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "adopt"
- name: Build with Maven
run: |
cd BytemanHelper
mvn package -Dmaven.test.skip=true
cd ..
cd ChaosAgent
mvn package -Dmaven.test.skip=true
cd ..
cd AgentInstaller
mvn package -Dmaven.test.skip=true
cd ..
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Configure awscli
run: |
pip3 install awscli
printf "%s\n" ${{ secrets.AWS_ACCESS_KEY }} ${{ secrets.AWS_SECRET_KEY }} ${{ secrets.AWS_REGION }} "json" | aws configure
- name: Package and Upload
env:
BYTEMAN_VERSION: 4.0.20
HELPER_VERSION: 0.12
VERSION: ${{ github.ref_name == 'main' && 'latest' || github.ref_name }}
run: |
$BYTEMAN_DIR=byteman-download-${BYTEMAN_VERSION}
curl -fsSLO https://downloads.jboss.org/byteman/${BYTEMAN_VERSION}/${BYTEMAN_DIR}-bin.zip
unzip ${BYTEMAN_DIR}-bin.zip
cp ./BytemanHelper/target/byteman-helper-${HELPER_VERSION}.jar ./${BYTEMAN_DIR}/lib/byteman-helper.jar
cp ./AgentInstaller/target/agent-installer-${HELPER_VERSION}.jar ./${BYTEMAN_DIR}/lib/agent-installer.jar
cp ./ChaosAgent/target/chaos-agent-${HELPER_VERSION}.jar ./${BYTEMAN_DIR}/lib/chaos-agent.jar
cp ./Scripts/bminstall.sh ./${BYTEMAN_DIR}/bin/
mv ./byteman-download-${BYTEMAN_VERSION} ./byteman-chaos-mesh-download-${VERSION}
tar czvf ./byteman-chaos-mesh-download-${VERSION}.tar.gz ./byteman-chaos-mesh-download-${VERSION}
aws s3 cp ./byteman-chaos-mesh-download-${VERSION}.tar.gz ${{ secrets.AWS_BUCKET_NAME }}/byteman-chaos-mesh-download-${VERSION}.tar.gz