Party Time API scene SDK7 conversion (#101) #19
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: test-build | |
on: | |
push: | |
pull_request: | |
jobs: | |
lint-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: build | |
run: ./build-all.sh | |
env: | |
DCL_DISABLE_ANALYTICS: "true" | |
SDK_VERSION: "@dcl/sdk@next" | |
- uses: actions/github-script@v6 | |
id: get-branch-realm-name | |
env: | |
BRANCH: ${{ github.head_ref || github.ref }} | |
with: | |
script: return `goerli-plaza-${process.env.BRANCH.replaceAll('/', '-').replaceAll('refs-heads-', '').substr(0, 28)}` | |
result-encoding: string | |
- uses: actions/github-script@v6 | |
id: get-sdk-version | |
with: | |
script: return require('./package.json').dependencies['@dcl/sdk'] | |
result-encoding: string | |
- name: export-static (permalink) | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
run: > | |
npm run export-static -- \ | |
--realmName goerli-plaza-${{ github.sha }} \ | |
--commsAdapter ws-room:ws-room-service.decentraland.org/rooms/${{ github.sha }} \ | |
--baseUrl '${{ secrets.SDK_TEAM_S3_BASE_URL }}/ipfs' \ | |
--destination "$(pwd)/ipfs" | |
- name: export-static (branch) | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
run: > | |
npm run export-static -- \ | |
--realmName ${{steps.get-branch-realm-name.outputs.result}} \ | |
--commsAdapter ws-room:ws-room-service.decentraland.org/rooms/${{steps.get-branch-realm-name.outputs.result}} \ | |
--baseUrl '${{ secrets.SDK_TEAM_S3_BASE_URL }}/ipfs' \ | |
--destination "$(pwd)/ipfs" | |
- name: upload to s3 | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
run: > | |
npx @dcl/cdn-uploader@next \ | |
--bucket ${{ secrets.SDK_TEAM_S3_BUCKET }} \ | |
--local-folder "$(pwd)/ipfs" \ | |
--bucket-folder 'ipfs' | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.SDK_TEAM_AWS_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.SDK_TEAM_AWS_SECRET }} | |
- name: Find Comment | |
uses: peter-evans/find-comment@v1 | |
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Test this pull request | |
- name: Create or update comment | |
uses: peter-evans/create-or-update-comment@v1 | |
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
# Test this pull request | |
- The `/changerealm` command to test [test in-world](https://play.decentraland.zone/?realm=${{ secrets.SDK_TEAM_S3_BASE_URL }}/ipfs/goerli-plaza-${{ github.sha }}) | |
```bash | |
# permalink | |
/changerealm ${{ secrets.SDK_TEAM_S3_BASE_URL }}/ipfs/goerli-plaza-${{ github.sha }} | |
# branch name | |
/changerealm ${{ secrets.SDK_TEAM_S3_BASE_URL }}/ipfs/${{steps.get-branch-realm-name.outputs.result}} | |
``` | |
- Test in [the Babylon.js explorer](https://babylon.decentraland.org/?realm=${{ secrets.SDK_TEAM_S3_BASE_URL }}/ipfs/goerli-plaza-${{ github.sha }}) | |
This PR has been published using the `@dcl/sdk` version `${{steps.get-sdk-version.outputs.result}}` | |
edit-mode: replace | |
- name: lint | |
run: npm run lint |