Skip to content

[TRUNK-17370] Add endpoint information to unknown failure reason #2764

[TRUNK-17370] Add endpoint information to unknown failure reason

[TRUNK-17370] Add endpoint information to unknown failure reason #2764

Workflow file for this run

name: Build and test context-js
on:
push:
branches:
- main
tags:
- "*"
pull_request: {}
workflow_dispatch: {}
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get date and SHA for S3 upload
id: get-date-sha
if: "!cancelled() && github.event_name != 'pull_request'"
shell: bash
run: |
GIT_SHA=$(git rev-parse --short HEAD)
DATE=$(date "+%Y-%m-%d")
echo "date=${DATE}" >> $GITHUB_OUTPUT
echo "sha=${GIT_SHA}" >> $GITHUB_OUTPUT
echo "reference=${DATE}/${GIT_SHA}" >> $GITHUB_OUTPUT
- name: Setup and build wasm
uses: ./.github/actions/setup_build_wasm
if: "!cancelled()"
- name: Upload wasm package
uses: actions/upload-artifact@v4
if: "!cancelled()"
with:
name: context-js-pkg
path: ./context-js/pkg
- name: Test wasm package
if: "!cancelled()"
run: pnpm run --dir ./context-js test
- name: Package wasm package
if: "!cancelled()"
run: pnpm pack --dir ./context-js/pkg
- name: Upload wasm package to S3
uses: ./.github/actions/upload_to_s3
if: "!cancelled() && github.event_name != 'pull_request'"
with:
bucket: ${{ secrets.S3_ASSET_BUCKET }}
name: context-js-0.1.0.tgz
path: context-js/pkg/context-js-0.1.0.tgz
role-to-assume: ${{ secrets.S3_UPLOAD_ROLE_ARN }}
date: ${{ steps.get-date-sha.outputs.date }}
sha: ${{ steps.get-date-sha.outputs.sha }}
- name: Annotate workflow with S3 reference
if: "!cancelled() && github.event_name != 'pull_request'"
run: |
echo "::notice title=Published bindings::context-js bindings published to S3 at ${{ steps.get-date-sha.outputs.reference }}"