chore: update GH actions to latest (#79) #6
Workflow file for this run
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: Deploy to Cloudfront | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
Deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ 18 ] | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
PACKAGE_NAME: '@ibm-aspera/connect-sdk-js' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install AWS CLI | |
run: | | |
pip install awscli --upgrade --user | |
aws --version | |
- name: Extract version from package.json | |
id: extract | |
run: echo ::set-output name=current-version::v$(jq -r '.version' package.json) | |
- name: Deploy ${{ steps.extract.outputs.current-version }} | |
run: node scripts/deploy-cdn.js --folder dist/js --distId ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --bucketName ${{ secrets.S3_BUCKET }} --packageName ${{ env.PACKAGE_NAME }} --tagName ${{ steps.extract.outputs.current-version }} | |
- name: Deploy Latest | |
run: node scripts/deploy-cdn.js --folder dist/js --distId ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --bucketName ${{ secrets.S3_BUCKET }} --packageName ${{ env.PACKAGE_NAME }} --tagName latest |