Skip to content

feat: allow to premint and create listing for an existing product #3954

feat: allow to premint and create listing for an existing product

feat: allow to premint and create listing for an existing product #3954

Workflow file for this run

name: Call reusable workflow - Interface
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: true
push:
branches:
- main
release:
types: [created]
pull_request:
branches:
- main
workflow_dispatch:
secrets:
CODECOV_TOKEN:
required: true
jobs:
prejob:
name: Get Latest Tag
runs-on: ubuntu-latest
outputs:
releaseTag: ${{ steps.tag.outputs.tag }}
releaseName: ${{ steps.name.outputs.name }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- uses: "WyriHaximus/github-action-get-previous-tag@v1"
id: tag
- run: echo "name=$(git describe --tags)" >> $GITHUB_OUTPUT
id: name
call-reusable-workflow-PR:
uses: ./.github/workflows/ci_reusable.yaml
if: github.event_name == 'pull_request'
needs: prejob
with:
REACT_APP_ENV_NAME: "testing"
DEPLOY_TO_FLEEK: false
IS_PREVIEW: true
ENV_NAME: "testing"
UPDATE_COVERAGE: false
REACT_APP_ENABLE_CURATION_LISTS: false
REACT_APP_IPFS_GATEWAY: "https://bosonprotocol.infura-ipfs.io/ipfs/"
REACT_APP_RELEASE_TAG: ${{ needs.prejob.outputs.releaseTag }}
REACT_APP_RELEASE_NAME: ${{ needs.prejob.outputs.releaseName }}
REACT_APP_DAPP_VIEW_MODE: "same_origin"
REACT_APP_DR_CENTER_VIEW_MODE: "same_origin"
REACT_APP_WIDGETS_URL: "https://widgets-test.on.fleek.co"
REACT_APP_UNISWAP_API_URL: "https://api.uniswap.org/v2"
REACT_APP_AWS_API_ENDPOINT: "https://api.uniswap.org/v1/graphql"
REACT_APP_MOONPAY_API: "https://api.moonpay.com"
REACT_APP_MOONPAY_LINK: "https://us-central1-uniswap-mobile.cloudfunctions.net/signMoonpayLinkV2?platform=web&env=staging"
REACT_APP_MOONPAY_EXTERNAL_LINK: "https://www.moonpay.com/buy"
REACT_APP_META_TX_API_KEY_MAP: ${{ vars.REACT_APP_META_TX_API_KEY_MAP_TESTING }}
REACT_APP_META_TX_API_IDS_MAP: ${{ vars.REACT_APP_META_TX_API_IDS_MAP_TESTING }}
REACT_APP_CAROUSEL_PROMOTED_SELLER_ID_MAP: ${{ vars.REACT_APP_CAROUSEL_PROMOTED_SELLER_ID_MAP }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS: ${{ secrets.REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS_TESTING }}
REACT_APP_WALLET_CONNECT_PROJECT_ID: ${{ secrets.REACT_APP_WALLET_CONNECT_PROJECT_ID_TESTING }}
REACT_APP_INFURA_KEY: ${{ secrets.REACT_APP_INFURA_KEY_TESTING }}
REACT_APP_MOONPAY_API_KEY: ${{ secrets.REACT_APP_MOONPAY_API_KEY_TESTING }}
REACT_APP_MAGIC_API_KEY: ${{ secrets.REACT_APP_MAGIC_API_KEY_TESTING }}
call-reusable-workflow-testing:
uses: ./.github/workflows/ci_reusable.yaml
if: github.event_name == 'push'
needs: prejob
with:
REACT_APP_ENV_NAME: "testing"
DEPLOY_TO_FLEEK: true
IS_PREVIEW: false
ENV_NAME: "testing"
UPDATE_COVERAGE: true
REACT_APP_ENABLE_CURATION_LISTS: true
REACT_APP_IPFS_GATEWAY: "https://bosonprotocol.infura-ipfs.io/ipfs"
REACT_APP_IPFS_IMAGE_GATEWAY: "https://test-permanent-fly-490.mypinata.cloud/ipfs"
REACT_APP_RELEASE_TAG: ${{ needs.prejob.outputs.releaseTag }}
REACT_APP_RELEASE_NAME: ${{ needs.prejob.outputs.releaseName }}
REACT_APP_DAPP_VIEW_MODE: "https://interface-test.on.fleek.co"
REACT_APP_DR_CENTER_VIEW_MODE: "https://drcenter-test.on.fleek.co"
REACT_APP_WIDGETS_URL: "https://widgets-test.on.fleek.co"
REACT_APP_UNISWAP_API_URL: "https://api.uniswap.org/v2"
REACT_APP_AWS_API_ENDPOINT: "https://api.uniswap.org/v1/graphql"
REACT_APP_MOONPAY_API: "https://api.moonpay.com"
REACT_APP_MOONPAY_LINK: "https://us-central1-uniswap-mobile.cloudfunctions.net/signMoonpayLinkV2?platform=web&env=staging"
REACT_APP_MOONPAY_EXTERNAL_LINK: "https://www.moonpay.com/buy"
REACT_APP_META_TX_API_KEY_MAP: ${{ vars.REACT_APP_META_TX_API_KEY_MAP_TESTING }}
REACT_APP_META_TX_API_IDS_MAP: ${{ vars.REACT_APP_META_TX_API_IDS_MAP_TESTING }}
REACT_APP_CAROUSEL_PROMOTED_SELLER_ID_MAP: ${{ vars.REACT_APP_CAROUSEL_PROMOTED_SELLER_ID_MAP }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
FLEEK_API_KEY: ${{ secrets.FLEEK_API_KEY }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
REACT_APP_INFURA_IPFS_PROJECT_ID: ${{ secrets.REACT_APP_INFURA_IPFS_PROJECT_ID }}
REACT_APP_INFURA_IPFS_PROJECT_SECRET: ${{ secrets.REACT_APP_INFURA_IPFS_PROJECT_SECRET }}
REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS: ${{ secrets.REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS_TESTING }}
REACT_APP_GOOGLE_TAG_ID: ${{ secrets.REACT_APP_GOOGLE_TAG_ID_TESTING }}
REACT_APP_WALLET_CONNECT_PROJECT_ID: ${{ secrets.REACT_APP_WALLET_CONNECT_PROJECT_ID_TESTING }}
REACT_APP_INFURA_KEY: ${{ secrets.REACT_APP_INFURA_KEY_TESTING }}
REACT_APP_MOONPAY_API_KEY: ${{ secrets.REACT_APP_MOONPAY_API_KEY_TESTING }}
REACT_APP_MAGIC_API_KEY: ${{ secrets.REACT_APP_MAGIC_API_KEY_TESTING }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
call-reusable-workflow-staging:
uses: ./.github/workflows/ci_reusable.yaml
if: github.event_name == 'release' && github.event.action == 'created'
needs: prejob
with:
REACT_APP_ENV_NAME: "staging"
DEPLOY_TO_FLEEK: true
IS_PREVIEW: false
ENV_NAME: "staging"
UPDATE_COVERAGE: false
REACT_APP_ENABLE_CURATION_LISTS: true
REACT_APP_IPFS_GATEWAY: "https://bosonprotocol.infura-ipfs.io/ipfs"
REACT_APP_IPFS_IMAGE_GATEWAY: "https://test-permanent-fly-490.mypinata.cloud/ipfs"
REACT_APP_RELEASE_TAG: ${{ needs.prejob.outputs.releaseTag }}
REACT_APP_RELEASE_NAME: ${{ needs.prejob.outputs.releaseName }}
REACT_APP_DAPP_VIEW_MODE: "https://interface-staging.on.fleek.co"
REACT_APP_DR_CENTER_VIEW_MODE: "https://drcenter-staging.on.fleek.co"
REACT_APP_WIDGETS_URL: "https://widgets-staging.on.fleek.co"
REACT_APP_UNISWAP_API_URL: "https://api.uniswap.org/v2"
REACT_APP_AWS_API_ENDPOINT: "https://api.uniswap.org/v1/graphql"
REACT_APP_MOONPAY_API: "https://api.moonpay.com"
REACT_APP_MOONPAY_LINK: "https://us-central1-uniswap-mobile.cloudfunctions.net/signMoonpayLinkV2?platform=web&env=staging"
REACT_APP_MOONPAY_EXTERNAL_LINK: "https://www.moonpay.com/buy"
REACT_APP_META_TX_API_KEY_MAP: ${{ vars.REACT_APP_META_TX_API_KEY_MAP_STAGING }}
REACT_APP_META_TX_API_IDS_MAP: ${{ vars.REACT_APP_META_TX_API_IDS_MAP_STAGING }}
REACT_APP_CAROUSEL_PROMOTED_SELLER_ID_MAP: ${{ vars.REACT_APP_CAROUSEL_PROMOTED_SELLER_ID_MAP }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
FLEEK_API_KEY: ${{ secrets.FLEEK_API_KEY }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
REACT_APP_INFURA_IPFS_PROJECT_ID: ${{ secrets.REACT_APP_INFURA_IPFS_PROJECT_ID }}
REACT_APP_INFURA_IPFS_PROJECT_SECRET: ${{ secrets.REACT_APP_INFURA_IPFS_PROJECT_SECRET }}
REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS: ${{ secrets.REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS_STAGING }}
REACT_APP_GOOGLE_TAG_ID: ${{ secrets.REACT_APP_GOOGLE_TAG_ID_STAGING }}
REACT_APP_WALLET_CONNECT_PROJECT_ID: ${{ secrets.REACT_APP_WALLET_CONNECT_PROJECT_ID_STAGING }}
REACT_APP_INFURA_KEY: ${{ secrets.REACT_APP_INFURA_KEY_STAGING }}
REACT_APP_MOONPAY_API_KEY: ${{ secrets.REACT_APP_MOONPAY_API_KEY_STAGING }}
REACT_APP_MAGIC_API_KEY: ${{ secrets.REACT_APP_MAGIC_API_KEY_STAGING }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
call-reusable-workflow-production:
uses: ./.github/workflows/ci_reusable.yaml
if: github.event_name == 'workflow_dispatch'
needs: prejob
with:
REACT_APP_ENV_NAME: "production"
DEPLOY_TO_FLEEK: true
IS_PREVIEW: false
ENV_NAME: "production"
UPDATE_COVERAGE: false
REACT_APP_ENABLE_CURATION_LISTS: true
REACT_APP_IPFS_GATEWAY: "https://bosonprotocol.infura-ipfs.io/ipfs"
REACT_APP_IPFS_IMAGE_GATEWAY: "https://gray-permanent-fly-490.mypinata.cloud/ipfs"
REACT_APP_RELEASE_TAG: ${{ needs.prejob.outputs.releaseTag }}
REACT_APP_RELEASE_NAME: ${{ needs.prejob.outputs.releaseName }}
REACT_APP_DAPP_VIEW_MODE: "https://bosonapp.io"
REACT_APP_DR_CENTER_VIEW_MODE: "https://disputes.bosonprotocol.io"
REACT_APP_WIDGETS_URL: "https://widgets.bosonprotocol.io"
REACT_APP_UNISWAP_API_URL: "https://api.uniswap.org/v2"
REACT_APP_AWS_API_ENDPOINT: "https://api.uniswap.org/v1/graphql"
REACT_APP_MOONPAY_API: "https://api.moonpay.com"
REACT_APP_MOONPAY_LINK: "https://us-central1-uniswap-mobile.cloudfunctions.net/signMoonpayLinkV2?platform=web&env=staging"
REACT_APP_MOONPAY_EXTERNAL_LINK: "https://www.moonpay.com/buy"
REACT_APP_META_TX_API_KEY_MAP: ${{ vars.REACT_APP_META_TX_API_KEY_MAP_PRODUCTION }}
REACT_APP_META_TX_API_IDS_MAP: ${{ vars.REACT_APP_META_TX_API_IDS_MAP_PRODUCTION }}
REACT_APP_CAROUSEL_PROMOTED_SELLER_ID_MAP: ${{ vars.REACT_APP_CAROUSEL_PROMOTED_SELLER_ID_MAP }}
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
FLEEK_API_KEY: ${{ secrets.FLEEK_API_KEY }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
REACT_APP_INFURA_IPFS_PROJECT_ID: ${{ secrets.REACT_APP_INFURA_IPFS_PROJECT_ID }}
REACT_APP_INFURA_IPFS_PROJECT_SECRET: ${{ secrets.REACT_APP_INFURA_IPFS_PROJECT_SECRET }}
REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS: ${{ secrets.REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS_PRODUCTION }}
REACT_APP_GOOGLE_TAG_ID: ${{ secrets.REACT_APP_GOOGLE_TAG_ID_PROD }}
REACT_APP_WALLET_CONNECT_PROJECT_ID: ${{ secrets.REACT_APP_WALLET_CONNECT_PROJECT_ID_PRODUCTION }}
REACT_APP_INFURA_KEY: ${{ secrets.REACT_APP_INFURA_KEY_PRODUCTION }}
REACT_APP_MOONPAY_API_KEY: ${{ secrets.REACT_APP_MOONPAY_API_KEY_PRODUCTION }}
REACT_APP_MAGIC_API_KEY: ${{ secrets.REACT_APP_MAGIC_API_KEY_PRODUCTION }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
job-summary:
name: Create Job Summary
runs-on: ubuntu-latest
if: ${{ always() && contains(join(needs.*.result, ','), 'success') }}
needs:
[
call-reusable-workflow-PR,
call-reusable-workflow-testing,
call-reusable-workflow-staging,
call-reusable-workflow-production
]
steps:
- uses: actions/checkout@v3
- name: Install JQ
uses: r26d/jq-action@master
with:
cmd: jq -n env
- name: Get job outputs
env:
OUTPUTS: ${{ toJSON(needs) }}
run: |
succeededJobOutput="$(
echo '${{ env.OUTPUTS }}' | jq '.[] | select(.result | startswith("success")) | .outputs'
)"
echo 'JOB_OUTPUT='$succeededJobOutput >> $GITHUB_ENV
- name: Get job vars
run: |
jobLint="$(
echo '${{ env.JOB_OUTPUT }}' |
jq '.JOB_LINT'
)"
echo 'JOB_LINT='$jobLint >> $GITHUB_ENV
jobBuild="$(
echo '${{ env.JOB_OUTPUT }}' |
jq '.JOB_BUILD'
)"
echo 'JOB_BUILD='$jobBuild >> $GITHUB_ENV
deployUrl="$(
echo '${{ env.JOB_OUTPUT }}' |
jq '.DEPLOY_URL'
)"
echo 'DEPLOY_URL='$deployUrl >> $GITHUB_ENV
- name: Adding Job Summary
run: |
echo "| Command | Status |" >> $GITHUB_STEP_SUMMARY
echo "| ---- | ---- |" >> $GITHUB_STEP_SUMMARY
if [ ${{ env.JOB_LINT }} == success ]; then
echo "| Lint | ✅ |" >> $GITHUB_STEP_SUMMARY
else
echo "| Lint | ❌ |" >> $GITHUB_STEP_SUMMARY
fi
if [ ${{ env.JOB_BUILD }} == success ]; then
echo "| Build | ✅ |" >> $GITHUB_STEP_SUMMARY
else
echo "| Build | ❌ |" >> $GITHUB_STEP_SUMMARY
fi
- name: Adding Job Summary Deploy Url
if: ${{ env.DEPLOY_URL }}
run: echo "| URL | ${{ env.DEPLOY_URL }} |" >> $GITHUB_STEP_SUMMARY