Skip to content

Commit

Permalink
Merge branch 'main' into autoTrackMedia_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kvramyasri7 committed Nov 14, 2023
2 parents 1d725c8 + a5eb335 commit 6f2d41e
Show file tree
Hide file tree
Showing 1,079 changed files with 260,460 additions and 168,828 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-samples-staging/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
env:
BRANCH: ${{ github.ref_name }}
run: |
if git ls-remote --exit-code --heads origin $BRANCH >/dev/null 2>&1; then
if git ls-remote origin $BRANCH | grep -q refs/heads/next/$BRANCH$; then
# Branch exists, checkout and echo success message
git fetch origin $BRANCH
git checkout $BRANCH
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/callable-npm-publish-lts-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release LTS version to npm and update repository

on:
workflow_call:
inputs:
target:
required: true
type: string

jobs:
deploy:
name: Publish to Amplify Package
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
path: amplify-js
token: ${{ secrets.GH_TOKEN_AMPLIFY_JS_WRITE }}

- name: Setup node and build the repository
uses: ./amplify-js/.github/actions/node-and-build

- name: Run npm publish
uses: ./amplify-js/.github/actions/npm-publish
with:
target: ${{ inputs.target }}
npm_token: ${{ secrets.NPM_TOKEN }}
github_user: ${{ vars.GH_USER}}
github_email: ${{ vars.GH_EMAIL}}

- name: Set github commit user
env:
GITHUB_EMAIL: ${{ vars.GH_EMAIL }}
GITHUB_USER: ${{ vars.GH_USER }}
run: |
git config --global user.email $GITHUB_EMAIL
git config --global user.name $GITHUB_USER
- name: Update API documentation
working-directory: ./amplify-js
run: |
yarn run docs
git add ./docs/api/
git commit -m "chore(release): update API docs [ci skip]"
- name: Push post release changes
working-directory: ./amplify-js
env:
TARGET_BRANCH: ${{ inputs.target }}
run: |
git push origin $TARGET_BRANCH
2 changes: 1 addition & 1 deletion .github/workflows/callable-npm-publish-preid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
ALLOW_PROTECTED_PREIDS: ${{ inputs.allow-protected-preid }}
PREID: ${{ inputs.preid }}
FORBIDDEN_PREIDS: latest
PROTECTED_PREIDS: next unstable
PROTECTED_PREIDS: next unstable stable-5 stable-4
run: |
echo "Testing to see if $PREID is in the forbidden list ($FORBIDDEN_PREIDS)"
for e in $FORBIDDEN_PREIDS; do [[ $PREID == $e ]] && echo "$PREID is forbidden from preid release" && exit 1; done
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/callable-npm-publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ jobs:
working-directory: ./amplify-js
run: |
git push origin release
git push -f origin required-release
if [ $(git tag -l "required-release") ]; then git push -f origin required-release; fi
git push --force-with-lease origin release:main
10 changes: 5 additions & 5 deletions .github/workflows/callable-release-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ jobs:
uses: ./.github/workflows/callable-prebuild-amplify-js.yml
with:
runs_on: ubuntu-latest
# prebuild-macos:
# uses: ./.github/workflows/callable-prebuild-amplify-js.yml
# with:
# runs_on: macos-latest
prebuild-macos:
uses: ./.github/workflows/callable-prebuild-amplify-js.yml
with:
runs_on: macos-latest
prebuild-samples-staging:
secrets: inherit
uses: ./.github/workflows/callable-prebuild-samples-staging.yml
e2e:
needs:
# - prebuild-macos
- prebuild-macos
- prebuild-ubuntu
- prebuild-samples-staging
secrets: inherit
Expand Down
30 changes: 25 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,29 @@ jobs:
- github-actions-test
- tsc-compliance-test
runs-on: ubuntu-latest
# This is a bit of a hack - Branch protections depend upon selected
# workflows that run on hardware, not parents of many callable workflows.
# Adding this so that unit and bundle checks can be a single protection line.
if: success() # only run when all checks have passed
# store success output flag for ci job
outputs:
success: ${{ steps.setoutput.outputs.success }}
steps:
- name: All tests passed
run: echo "All tests passed"
- id: setoutput
run: echo "::set-output name=success::true"
ci:
runs-on: ubuntu-latest
if: always() # always run, so we never skip the check
name: ci - Unit and Bundle tests have passed
needs: all-unit-tests-pass
env:
PASSED: ${{ needs.all-unit-tests-pass.outputs.success }}
steps:
# this job passes only when output of all-unit-tests-pass job is set
# in case at least one of the checks fails, all-unit-tests-pass is skipped
# and the output will not be set, which will then cause the ci job to fail
- run: |
if [[ $PASSED == "true" ]]; then
echo "All checks have passed"
exit 0
else
echo "One or more checks have failed"
exit 1
fi
25 changes: 25 additions & 0 deletions .github/workflows/push-lts-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Push - release from LTS branch to LTS dist tag

concurrency:
# group name unique for push to push-latest-release
group: push-lts-release-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- v5-stable

jobs:
e2e:
secrets: inherit
uses: ./.github/workflows/callable-release-verification.yml
release:
needs:
- e2e
permissions:
contents: write
secrets: inherit
uses: ./.github/workflows/callable-npm-publish-lts-release.yml
with:
target: v5-stable # TODO Update this to support other LTS branches in the future
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ coverage-ts/
**/example/ios/Podfile.lock
**/example/.bundle
**/example/yarn.lock

# rollup
**/.rollup.cache
**/buildMeta
2 changes: 1 addition & 1 deletion docs/api/assets/js/search.json

Large diffs are not rendered by default.

Loading

0 comments on commit 6f2d41e

Please sign in to comment.