Skip to content

1.29.0

1.29.0 #73

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
uses: ./.github/workflows/build.yml
release:
runs-on: S3-deployer
needs: build
permissions:
contents: write
steps:
- name: Set Aikido version
run: |
echo "AIKIDO_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Set env
run: |
echo "AIKIDO_S3=s3://aikido-firewall" >> $GITHUB_ENV
echo "AIKIDO_S3_BUCKET=v${{ env.AIKIDO_VERSION }}/linux_x86_64" >> $GITHUB_ENV
echo "AIKIDO_RPM=aikido-php-firewall-${{ env.AIKIDO_VERSION }}-1.x86_64.rpm" >> $GITHUB_ENV
echo "AIKIDO_DEB=aikido-php-firewall-${{ env.AIKIDO_VERSION }}.x86_64.deb" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: |
aikido-php-firewall-${{ env.AIKIDO_VERSION }}*
- name: List Artifacts
run: |
ls -l
pwd
- name: Setup AWS CLI Production
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.S3_AWS_ACCESS_KEY_ID_PROD }}
aws-secret-access-key: ${{ secrets.S3_AWS_SECRET_ACCESS_KEY_PROD }}
aws-region: eu-west-1
- name: Sync packages to S3 bucket
run: |
ls -l
aws s3 cp ${{ env.AIKIDO_RPM }}/${{ env.AIKIDO_RPM }} ${{ env.AIKIDO_S3 }}/${{ env.AIKIDO_S3_BUCKET }}/${{ env.AIKIDO_RPM }}
aws s3 cp ${{ env.AIKIDO_DEB }}/${{ env.AIKIDO_DEB }} ${{ env.AIKIDO_S3 }}/${{ env.AIKIDO_S3_BUCKET }}/${{ env.AIKIDO_DEB }}
- name: Make S3 bucket publicly readable
run: |
aws s3api put-object-acl --acl public-read --bucket aikido-firewall --key ${{ env.AIKIDO_S3_BUCKET }}/${{ env.AIKIDO_RPM }}
aws s3api put-object-acl --acl public-read --bucket aikido-firewall --key ${{ env.AIKIDO_S3_BUCKET }}/${{ env.AIKIDO_DEB }}
- name: Deploy to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
./**/aikido-php-firewall-${{ env.AIKIDO_VERSION }}*