diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 612c5b6..1300c59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,10 +4,23 @@ on: tags: - "v*.*.*" + +permissions: + contents: write + id-token: write + packages: read + jobs: release: runs-on: macos-13 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" + role-session-name: "github-action-oomol-lab-ovm" + aws-region: us-east-1 + - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 @@ -48,3 +61,13 @@ jobs: fail_on_unmatched_files: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Get Tag Name + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - name: Upload To S3 + run: | + aws s3 cp \ + ./out/ \ + s3://oomol-static/ovm-resources/ovm/$RELEASE_VERSION \ + --exclude "*" --include "ovm*"