Skip to content

TPGZ Release Automation #22

TPGZ Release Automation

TPGZ Release Automation #22

Workflow file for this run

name: TPGZ Release Automation
on:
release:
types:
- published
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Download latest release patches
run: curl -s https://api.github.com/repos/zsrtp/tpgz/releases/latest | grep "http.*patch" | cut -d ":" -f 2,3 | tr -d \ \" | wget -qi - --directory-prefix patches/
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Download existing meta.json
run: aws s3 cp s3://${{ secrets.AWS_S3_BUCKET }}/patches/meta.json meta.json
- name: Update meta.json
run: |
python3 external/misc/meta.py
- name: Upload updated meta.json to S3
run: aws s3 cp meta.json s3://${{ secrets.AWS_S3_BUCKET }}/patches/meta.json --acl public-read
- name: Sync directory to S3
run: |
aws s3 sync patches/ s3://${{ secrets.AWS_S3_BUCKET }}/patches/ --acl public-read