diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 67359ce..473addc 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -55,22 +55,11 @@ jobs: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} aws-region: 'eu-central-1' - - run: npx nx run-many --target=build --parallel=3 --exclude=acq,core,discord,discord-bot-ui,react,sdk,docs.siwt.xyz,siwt.xyz-e2e,smart-contracts --skip-nx-cache - - run: npx nx run-many --target=build-server --parallel=3 --exclude=acq,core,discord,discord-bot-ui,react,sdk,docs.siwt.xyz,siwt.xyz-e2e,smart-contracts --skip-nx-cache + - run: npx nx build siwt.xyz --skip-nx-cache + - run: npx nx build-server siwt.xyz --skip-nx-cache - - name: Setup staging env file - if: github.ref == 'refs/heads/develop' - env: - CERTIFICATE_ARN: ${{ secrets.STAGING_SIWT_XYZ_SSL_CERTIFICATE_ARN }} - ENV: staging - CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.STAGING_SIWT_XYZ_DISTRIBUTION_ID }} - run: | - touch .env - echo SSL_CERTIFICATE_ARN=$CERTIFICATE_ARN >> .env - echo ENV=$ENV >> .env - cat .env - name: Setup production env file - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/develop' env: CERTIFICATE_ARN: ${{ secrets.SIWT_XYZ_SSL_CERTIFICATE_ARN }} ENV: production @@ -81,14 +70,9 @@ jobs: echo ENV=$ENV >> .env cat .env - name: Deploy - run: npx nx run-many --target=deploy --exclude=acq,core,discord,discord-bot-ui,discord-bot-ui-e2e,react,sdk,docs.siwt.xyz,siwt.xyz-e2e,smart-contracts --production --skip-nx-cache - - name: Invalidate Staging Distribution + run: npx nx deploy siwt.xyz --production --skip-nx-cache + - name: Invalidate Distribution if: github.ref == 'refs/heads/develop' - env: - CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.STAGING_SIWT_XYZ_DISTRIBUTION_ID }} - run: aws cloudfront create-invalidation --distribution-id=$CLOUDFRONT_DISTRIBUTION_ID --paths '/*' - - name: Invalidate Production Distribution - if: github.ref == 'refs/heads/main' env: CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.SIWT_XYZ_DISTRIBUTION_ID }} run: aws cloudfront create-invalidation --distribution-id=$CLOUDFRONT_DISTRIBUTION_ID --paths '/*' diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml index 895f2b7..1bfa024 100644 --- a/.github/workflows/release-packages.yml +++ b/.github/workflows/release-packages.yml @@ -8,6 +8,7 @@ on: jobs: build-and-release: runs-on: ubuntu-latest + environment: Packages steps: - uses: actions/checkout@v4 - name: Set up Node.js diff --git a/packages/acq/package.json b/packages/acq/package.json index 6dca264..3c053ee 100644 --- a/packages/acq/package.json +++ b/packages/acq/package.json @@ -1,6 +1,6 @@ { "name": "@siwt/acq", - "version": "0.0.6", + "version": "0.0.7", "dependencies": { "tslib": "^2.3.0" }, diff --git a/packages/core/package.json b/packages/core/package.json index bf30c56..1be8298 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@siwt/core", - "version": "0.0.6", + "version": "0.0.7", "dependencies": { "tslib": "^2.3.0" }, diff --git a/packages/react/package.json b/packages/react/package.json index c28da86..1f2d12a 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@siwt/react", - "version": "0.0.6", + "version": "0.0.7", "dependencies": {}, "main": "./index.js", "module": "./index.mjs", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 8a77c36..e6d01be 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@siwt/sdk", - "version": "0.0.6", + "version": "0.0.7", "dependencies": { "tslib": "^2.3.0" }, diff --git a/packages/siwt.xyz/components/Try/Try.tsx b/packages/siwt.xyz/components/Try/Try.tsx index 6942e3f..fc9f3e5 100644 --- a/packages/siwt.xyz/components/Try/Try.tsx +++ b/packages/siwt.xyz/components/Try/Try.tsx @@ -59,7 +59,7 @@ export const Try = () => { const [isAllowlistInputValid, setIsAllowlistInputValid] = useState(true) const [selectedPolicies, setSelectedPolicies] = useState([]) const [customPolicies, setCustomPolicies] = useState('') - const [isCustomPoliciesValid, setIsCustomPoliciesValid] = useState(true) + const [areCustomPoliciesValid, setAreCustomPoliciesValid] = useState(true) const [activeAccount, setActiveAccount] = useState({} as AccountInfo) const [message, setMessage] = useState('') const [signature, setSignature] = useState('') @@ -197,9 +197,12 @@ export const Try = () => { const onChangeCustomPolicies = (event: ChangeEvent) => { setCustomPolicies(event.currentTarget.value) - test(/^([A-Za-z0-9]+, )*[A-Za-z0-9]+$/, event.currentTarget.value) || event.currentTarget.value === '' - ? setIsCustomPoliciesValid(true) - : setIsCustomPoliciesValid(false) + test( + /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/, + event.currentTarget.value, + ) || event.currentTarget.value === '' + ? setAreCustomPoliciesValid(true) + : setAreCustomPoliciesValid(false) } const onChangeSelectedPolicies = (id: string) => { @@ -407,7 +410,7 @@ export const Try = () => { @@ -417,8 +420,8 @@ export const Try = () => { id="other-policies" value={customPolicies} onChange={onChangeCustomPolicies} - explainer="Comma separated list of other policies your dApp may have. For example: 'Cookie policy, Refund policy'" - hasValidInput={isCustomPoliciesValid} + explainer="Comma separated list of urls to other policies your dApp may have." + hasValidInput={areCustomPoliciesValid} /> diff --git a/packages/smart-contracts/package.json b/packages/smart-contracts/package.json index b9ccde0..2ace7d8 100644 --- a/packages/smart-contracts/package.json +++ b/packages/smart-contracts/package.json @@ -1,6 +1,6 @@ { "name": "@siwt/smart-contracts", - "version": "0.0.6", + "version": "0.0.7", "type": "commonjs", "scripts": { "tzgen": "tzgen",