[PLAT-5090] Use new scene alteration payload (#634) #598
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: Master | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout changes" | |
uses: actions/checkout@v4 | |
- name: Set Node Version | |
id: nvm | |
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: "Install" | |
run: "yarn install --frozen-lockfile" | |
- name: "Build" | |
run: "yarn build" | |
- name: "Test" | |
run: "yarn test:ci" | |
- name: "Upload build artifacts" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact | |
path: | | |
packages/*/dist | |
packages/viewer/loader | |
detect-publish-release: | |
runs-on: ubuntu-latest | |
outputs: | |
publish: ${{ steps.detect-publish.outputs.publish }} | |
steps: | |
- name: "Checkout changes" | |
uses: actions/checkout@v4 | |
- name: "Detect publish" | |
id: "detect-publish" | |
run: | | |
result=`./scripts/detect_release.sh` | |
echo $result | |
echo ::set-output name=publish::$result | |
publish-canary: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: "Checkout changes" | |
uses: actions/checkout@v4 | |
- name: "Download build artifacts" | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-artifact | |
path: packages | |
- name: Set Node Version | |
id: nvm | |
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
registry-url: https://registry.npmjs.org | |
scope: "@vertexvis" | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: "Install" | |
run: "yarn install" | |
- name: "Publish Canary to NPM" | |
env: | |
NODE_AUTH_TOKEN: "${{ secrets.NPMJS_ACCESS_TOKEN }}" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPOSITORY: ${{ github.repository }} | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
./scripts/publish_canary.sh | |
publish-release: | |
runs-on: ubuntu-latest | |
needs: [build, detect-publish-release, publish-canary] | |
if: needs.detect-publish-release.outputs.publish == 1 | |
steps: | |
- name: "Checkout changes" | |
uses: actions/checkout@v4 | |
- name: "Download build artifacts" | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-artifact | |
path: packages | |
- name: Set Node Version | |
id: nvm | |
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
registry-url: https://registry.npmjs.org | |
scope: "@vertexvis" | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: "Install" | |
run: "yarn install" | |
- name: "Publish Release to NPM" | |
env: | |
NODE_AUTH_TOKEN: "${{ secrets.NPMJS_ACCESS_TOKEN }}" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPOSITORY: ${{ github.repository }} | |
run: "./scripts/publish_release.sh" | |
docs: | |
runs-on: ubuntu-latest | |
needs: [publish-release] | |
steps: | |
- name: "Checkout changes" | |
uses: actions/checkout@v4 | |
- name: "Download build artifacts" | |
uses: actions/download-artifact@v4 | |
with: | |
name: build-artifact | |
path: packages | |
- name: Set Node Version | |
id: nvm | |
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
registry-url: https://registry.npmjs.org | |
scope: "@vertexvis" | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
node_modules | |
*/*/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} | |
- name: "Install" | |
run: "yarn install" | |
- name: "Generate docs" | |
run: "yarn generate:docs" | |
- name: "Publish docs" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add -f docs/ | |
git commit -m "new docs" | |
git push -f origin HEAD:gh-pages |