marketplace-1.0.7 #50
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy NEWM Mobile Wallet Connector app to AWS on published release | |
on: | |
release: | |
types: [ published ] | |
workflow_dispatch: | |
jobs: | |
build_and_deploy_mobile_wallet_connector_release: | |
if: ${{ startsWith(github.event.release.tag_name, 'mobile-wallet-connector') }} | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # required to interact with GitHub's OIDC Token endpoint. | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Lambda-ify | |
run: echo "COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.7.1 /lambda-adapter /opt/extensions/lambda-adapter" >> apps/mobile-wallet-connector/Dockerfile | |
- name: Install AWS CDK | |
run: npm install -g aws-cdk | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: ${{ secrets.AWS_GITHUB_DEPLOY_ROLE_ARN_STUDIO }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Deploy mobile-wallet-connector | |
run: | | |
npm install --prefix .github/workflows/cdk | |
sed -i 's|const nextConfig = .*|const nextConfig = { basePath: "/wallet-connect", |' apps/mobile-wallet-connector/next.config.js | |
APPNAME=mobile-wallet-connector APPID=MobileWalletConnector QUALIFIER=Studio NEXT_PUBLIC_ENV=production NEXT_PUBLIC_RECAPTCHA_SITE_KEY_PROD=${{ secrets.RECAPTCHA_SITE_KEY_PROD }} NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID_PROD=${{ secrets.LAUNCHDARKLY_CLIENT_ID_PROD }} NEXT_PUBLIC_DEXHUNTER_TOOLS_PARTNER_CODE=${{ secrets.DEXHUNTER_TOOLS_PARTNER_CODE }} NX_CLOUD_ACCESS_TOKEN=${{ secrets.NX_CLOUD_ACCESS_TOKEN }} npm run --prefix .github/workflows/cdk cdk:deploy deploy -- --require-approval never | |
- name: Send update to slack | |
id: slack | |
uses: slackapi/[email protected] | |
with: | |
payload: | | |
{ | |
"text": "NEWM Mobile Wallet Connector updated in production. View at https://tools.newm.io/wallet-connect . View release notes at https://github.com/projectNEWM/newm-web/releases/tag/${{ github.event.release.tag_name }} ." | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NEWM_MOBILE_WALLET_CONNECTOR_WEBHOOK }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |