Skip to content

v0.5.0-alpha.3

v0.5.0-alpha.3 #54

Workflow file for this run

name: cdn
on:
release:
types: [published]
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
name: cdn/publish
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: 'false'
- name: Set up Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 22.x
cache: 'npm'
- name: Update npm
run: npm install -g npm@11.7.0
- name: Install dependencies
run: npm ci
- name: Run prettier
run: npm run prettier:check
- name: Run lint
run: npm run lint
- name: Run strict build
run: npm run build:strict
- name: Run tests
run: npm test
- name: Get package version
id: package-version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Build package
env:
PACKAGE_VERSION: ${{ steps.package-version.outputs.version }}
run: BASE_PATH=https://cdn.zama.org/relayer-sdk-js/${PACKAGE_VERSION}/ npm run build
- name: Archive bundle
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: relayer-sdk-js-bundle-${{ steps.package-version.outputs.version }}
path: ./bundle
- name: Upload bundle
uses: shallwefootball/s3-upload-action@4350529f410221787ccf424e50133cbc1b52704e # v1.3.3
with:
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_KEY_S3_USER}}
aws_bucket: ${{ secrets.AWS_BUCKET_NAME }}
destination_dir: relayer-sdk-js/${{ steps.package-version.outputs.version }}
source_dir: './bundle'