Skip to content

fix(deps): bump js-yaml and nanoid to patched versions (#786) #666

fix(deps): bump js-yaml and nanoid to patched versions (#786)

fix(deps): bump js-yaml and nanoid to patched versions (#786) #666

name: Push - release from main to latest
concurrency:
# group name unique for push to push-main-release
group: push-release-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
# NOTE: to run E2E tests against an `amplify-data` branch, add the name
# of that branch (and corresponding `amplify-js-samples-staging` branch, if
# testing sample / test changes) here.
# Must disable publishing prior to adding this branch to avoid
# accidentally publishing changes.
- main
# Restrict the default GITHUB_TOKEN to least privilege.
# The release job publishes via a dedicated PAT (GH_TOKEN_AMPLIFY_WRITE) / NPM_TOKEN,
# and the sandbox_test job sets its own id-token: write for AWS OIDC below.
permissions:
contents: read
jobs:
prebuild-ubuntu:
uses: ./.github/workflows/callable-prebuild-amplify-data.yml
with:
runs_on: ubuntu-latest
# This step is included at the top level as a workround (i.e. not in a
# nested workflow). See: https://github.com/orgs/community/discussions/76409.
# The `configure-aws-credentials` GH Action is unable to retrieve the JWT
# token when run from a nested workflow.
# TODO: Find a workaround or alternative so that this can be included in a
# nested workflow (e.g. `callable-sandbox-e2e-tests.yml`).
sandbox_test:
name: Sandbox E2E Tests
needs: prebuild-ubuntu
runs-on: ubuntu-latest
permissions:
# these permissions are required for the `configure-aws-credentials` action to get a JWT:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: amplify-data
- name: Setup node and build the repository
uses: ./amplify-data/.github/actions/node-and-build
- name: Configure AWS test execution credentials
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.1.0
with:
role-to-assume: ${{ secrets.SANDBOX_E2E_RUNNER_ROLE_ARN }}
aws-region: us-west-2
- name: Install Sandbox E2E Dependencies
working-directory: ./amplify-data
run: yarn e2e-sandbox:install
- name: Run E2E sandbox tests
working-directory: ./amplify-data
run: yarn e2e-sandbox:test
release-verification-testing:
secrets: inherit
uses: ./.github/workflows/callable-release-verification.yml
release:
needs:
- release-verification-testing
- sandbox_test
secrets: inherit
uses: ./.github/workflows/callable-publish-release.yml