diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 131f20f..f5c8436 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,8 @@ on: permissions: contents: write + id-token: write + packages: read env: GH_TOKEN: ${{ github.token }} @@ -103,3 +105,30 @@ jobs: -R ${{ github.repository }} \ --cleanup-tag \ --yes + + upload: + runs-on: ubuntu-latest + needs: post-release + if: ${{ success() }} + + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: "arn:aws:iam::${{ secrets.AWS_IAM_ACCOUNT_ID }}:role/github-action-oomol-lab-ovm-core" + role-session-name: "github-action-oomol-lab-ovm-core" + aws-region: us-east-1 + + - name: Download Release + working-directory: ./out + run: | + gh release download \ + ${{ github.ref_name }} \ + -R ${{ github.repository }} + + - name: Upload To S3 + run: | + aws s3 cp \ + ./out/ \ + s3://oomol-static/ovm-resources/ovm-core/${{ github.ref_name }} \ + --recursive --include "*"