Skip to content

Commit

Permalink
chore: update github workflows and add publishing tag on merge (#6260)
Browse files Browse the repository at this point in the history
* chore: update github workflows and add publishing tag on merge

* chore: publish workflow in correct directory

* chore: remove edits to sample workflow
  • Loading branch information
scanlonp authored Dec 20, 2024
1 parent 09d7d54 commit 0a30f78
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 1 deletion.
68 changes: 68 additions & 0 deletions .github/workflows/email-mfa.publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Description: This workflow runs unit + e2e tests, then publishes UI packages
# to a custom dist NPM tag of your choice. This is intended to run
# on release branches (e.g. `in-app-messaging/release`).
#
# Triggered by: This runs whenever you push a commit to the specified release branch.
#
# To use: replace <BRANCH> with your release branch name. Replace <TAG> with
# your NPM tag name.

name: Test and Publish / feat-email-mfa/main

on:
# You may change this to `pull_request` if you want to run this on a PRs.
# This can be useful for publishing hotfixes quickly to unblock customers,
# but otherwise, we recommend to use a release branch.
push:
branches: feat-email-mfa/main

# This permission block is only required if you're running e2e tests.
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
# You can skip tests based on your use case.
setup-cache:
uses: ./.github/workflows/reusable-setup-cache.yml
with:
commit: ${{ github.sha }}
repository: ${{ github.repository }}

unit:
uses: ./.github/workflows/reusable-unit.yml
needs: setup-cache
with:
commit: ${{ github.sha }}
repository: ${{ github.repository }}

e2e:
uses: ./.github/workflows/reusable-e2e.yml
needs: unit
with:
commit: ${{ github.sha }}
repository: ${{ github.repository }}
secrets:
AUTH_E2E_ROLE_ARN: ${{ secrets.AUTH_E2E_ROLE_ARN }}
DATASTORE_E2E_ROLE_ARN: ${{ secrets.DATASTORE_E2E_ROLE_ARN }}
GEO_E2E_ROLE_ARN: ${{ secrets.GEO_E2E_ROLE_ARN }}
STORAGE_E2E_ROLE_ARN: ${{ secrets.STORAGE_E2E_ROLE_ARN }}
IN_APP_MESSAGING_E2E_ROLE_ARN: ${{ secrets.IN_APP_MESSAGING_E2E_ROLE_ARN }}
LIVENESS_E2E_ROLE_ARN: ${{ secrets.LIVENESS_E2E_ROLE_ARN }}
DOMAIN: ${{ secrets.DOMAIN }}
PHONE_NUMBER: ${{ secrets.PHONE_NUMBER }}
USERNAME: ${{ secrets.USERNAME }}
NEW_PASSWORD: ${{ secrets.NEW_PASSWORD }}
VALID_PASSWORD: ${{ secrets.VALID_PASSWORD }}
SITE_URL: ${{ secrets.SITE_URL }}
DOCSEARCH_DOCS_APP_ID: ${{ secrets.DOCSEARCH_DOCS_APP_ID }}
DOCSEARCH_DOCS_API_KEY: ${{ secrets.DOCSEARCH_DOCS_API_KEY }}
DOCSEARCH_DOCS_INDEX_NAME: ${{ secrets.DOCSEARCH_DOCS_INDEX_NAME }}

publish:
uses: ./.github/workflows/reusable-tagged-publish.yml
needs: e2e
with:
dist-tag: email-mfa
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test-internal-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

on:
pull_request:
branches: [main, hotfix]
branches: feat-email-mfa/main
types: [opened, synchronize, labeled]

jobs:
Expand Down

0 comments on commit 0a30f78

Please sign in to comment.