Added social emote outcome index #1614
This file contains hidden or 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
on: | |
push: | |
branches: | |
- main | |
- experimental | |
pull_request: | |
release: | |
types: | |
- created | |
env: | |
BRANCH_TAG: ${{ github.ref_name == 'experimental' && 'experimental' || '' }} | |
name: build-deploy | |
jobs: | |
check_and_build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
outputs: | |
dcl_protocol_s3_bucket_key: ${{ steps.publish_dcl_protocol.outputs.s3-bucket-key }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
- name: install | |
run: make install | |
- name: buf build | |
run: make buf-build | |
- name: build and compile test | |
run: make test | |
- name: publish packages | |
uses: menduz/oddish-action@master | |
id: publish_dcl_protocol | |
with: | |
registry-url: "https://registry.npmjs.org" | |
access: public | |
## use action runId instead of current date to generate snapshot numbers | |
deterministic-snapshot: true | |
## sign the deployment | |
provenance: true | |
## publish every package to s3 | |
s3-bucket: ${{ secrets.SDK_TEAM_S3_BUCKET }} | |
s3-bucket-key-prefix: "@dcl/protocol/branch/${{ steps.myref.outputs.branch }}" | |
s3-bucket-region: ${{ secrets.SDK_TEAM_AWS_REGION }} | |
## inform gitlab after publishing to proceed with CDN propagation | |
gitlab-token: ${{ secrets.GITLAB_TOKEN }} | |
gitlab-pipeline-url: ${{ secrets.GITLAB_URL }} | |
custom-tag: ${{ env.BRANCH_TAG }} | |
branch-to-custom-tag: ${{ env.BRANCH_TAG }} | |
env: | |
BRANCH_NAME: ${{ github.ref_name }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: ${{ secrets.SDK_TEAM_AWS_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.SDK_TEAM_AWS_SECRET }} | |
notify_deployment: | |
needs: [check_and_build] | |
if: ${{ github.event.pull_request.number }} | |
runs-on: ubuntu-latest | |
name: Deployment Notification | |
steps: | |
- name: Find Comment | |
uses: peter-evans/find-comment@v1 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: "github-actions[bot]" | |
body-includes: Test this pull request | |
- name: Get the current branch name | |
shell: bash | |
run: node -e "console.log('::set-output name=branch::' + ('${{github.head_ref}}' || '$GITHUB_REF'.replace('refs/heads/','')) )" | |
id: myref | |
- name: Generate S3 URL | |
id: url-generator | |
run: | | |
body=$(echo ${{ secrets.SDK_TEAM_S3_BASE_URL }})/${{ needs.check_and_build.outputs.dcl_protocol_s3_bucket_key }} | |
echo ::set-output name=body::$body | |
- name: Create or update comment | |
uses: peter-evans/create-or-update-comment@v1 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
# Test this pull request on NPM or Yarn | |
- The `@dcl/protocol` package can be tested in scenes by running the following NPM command: | |
```bash | |
npm install "${{ steps.url-generator.outputs.body }}" | |
``` | |
- The `@dcl/protocol` package can be tested in scenes by running the following YARN command: | |
```bash | |
yarn add "${{ steps.url-generator.outputs.body }}" | |
``` | |
edit-mode: replace |