Skip to content

Commit f3756b7

Browse files
authored
ci: update release pipeline with s3 upload (openobserve#7010)
Added step to upload openobserve binaries to aws s3 bucket
1 parent f2c0e26 commit f3756b7

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,28 @@ jobs:
177177
- name: Download artifacts
178178
uses: actions/download-artifact@v4
179179

180+
- name: Upload to S3
181+
env:
182+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
183+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
184+
AWS_REGION: ${{ vars.AWS_S3_REGION }}
185+
BUCKET: ${{ vars.AWS_S3_BUCKET_NAME }}
186+
run: |
187+
if ! command -v aws &> /dev/null; then
188+
echo "AWS CLI not found. Installing..."
189+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
190+
unzip awscliv2.zip
191+
sudo ./aws/install
192+
else
193+
echo "AWS CLI already installed."
194+
fi
195+
196+
echo "Uploading artifacts to S3..."
197+
for file in $(find . -type f \( -name "openobserve*.tar.gz" -o -name "*.zip" -o -name "openobserve*.sha256sum" \)); do
198+
echo "Uploading $file to s3://${BUCKET}/releases/${GITHUB_REF_NAME}/"
199+
aws s3 cp "$file" "s3://${BUCKET}/releases/${GITHUB_REF_NAME}/$(basename "$file")"
200+
done
201+
180202
- name: Publish release
181203
uses: softprops/action-gh-release@v2
182204
with:

0 commit comments

Comments
 (0)