Publish to CDN #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to CDN | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Release tag' | |
required: true | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
# These permissions are necessary to run the configure-aws-credentials action | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.inputs.version }} | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/prod-ably-sdk-cdn | |
role-session-name: "${{ github.run_id }}-${{ github.run_number }}" | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20.x | |
- run: npm ci | |
- run: node scripts/cdn_deploy.js --skipCheckout --tag=${{ github.event.inputs.version }} |