e9e29aacb1
* release: init action to release first party PRs * release: check if revision has already been uploaded We don't want to waste bandwidth on files that already exist. * release: consolidate s3 uploading into single script; check if artifact already uploaded * release: only upload release for PR if it has the "upload to s3" label
34 lines
1 KiB
YAML
34 lines
1 KiB
YAML
name: Release Branch
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
# NOTE: make sure any branches here are also valid directory names,
|
|
# otherwise creating the directory and uploading to s3 will fail
|
|
- 'main'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
id-token: write # In order to request a JWT for AWS auth
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Download Buildkite Artifacts
|
|
uses: EnricoMi/download-buildkite-artifact-action@v1.14
|
|
with:
|
|
buildkite_token: ${{ secrets.BUILDKITE_TOKEN }}
|
|
output_path: artifacts
|
|
- name: Configure AWS Credentials
|
|
uses: aws-actions/configure-aws-credentials@v1
|
|
with:
|
|
role-to-assume: ${{ secrets.AWS_S3_UPLOAD_ROLE }}
|
|
aws-region: us-east-2
|
|
- name: Publish Release (Branch)
|
|
env:
|
|
AWS_BUCKET: ${{ secrets.AWS_S3_UPLOAD_BUCKET }}
|
|
run: |
|
|
LATEST_BRANCH="latest_${{ github.ref_name }}"
|
|
./upload_s3.sh "$LATEST_BRANCH"
|