diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..7b1bed0 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,26 @@ +name: cd +on: + push: + tags: ['*.*'] +jobs: + deploy: + runs-on: ubuntu-latest + environment: aws + permissions: + contents: read + id-token: write + env: + AWS_BUCKET: ${{ vars.AWS_BUCKET }} + AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} + AWS_ROLE: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/${{ vars.AWS_ROLE }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.9" + - run: zip vtwsclib.zip vtwsclib.py + - uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ env.AWS_DEFAULT_REGION }} + role-to-assume: ${{ env.AWS_ROLE }} + - run: aws s3 cp vtwsclib.zip s3://${{ env.AWS_BUCKET }}/vtwsclib.zip