Skip to content

new-release

new-release #27

name: Update packages
on:
repository_dispatch:
types: [new-release]
jobs:
update:
name: Update package
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Enable corepack
run: corepack enable
- name: Update package for each subdirectory
run: |
for dir in $(find . -mindepth 3 -maxdepth 3 -type d ! -path "./.git*"); do
cd "$dir"
echo "Updating package for $dir"
npx npm-check-updates -u @superviz/sdk
npx npm-check-updates -u @superviz/react-sdk
npx npm-check-updates -u @superviz/matterport-plugin
npx npm-check-updates -u @superviz/autodesk-viewer-plugin
npx npm-check-updates -u @superviz/threejs-plugin
yarn install
git add .
cd -
done
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Update package
dispatch:
name: Repository Dispatch
runs-on: ubuntu-latest
steps:
- name: Update doc-samples
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.SUPERVIZ_DEV_TOKEN }}
repository: SuperViz/docs-samples
event-type: new-release
client-payload: '{"version": "v0.0.0"}'
- name: Update demos
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.SUPERVIZ_DEV_TOKEN }}
repository: SuperViz/demos
event-type: new-release
client-payload: '{"version": "v0.0.0"}'
- name: Update doc-demos
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.SUPERVIZ_DEV_TOKEN }}
repository: SuperViz/docs-demos
event-type: new-release
client-payload: '{"version": "v0.0.0"}'
slackNotificationProduction:
needs:
- dispatch
name: Slack Notification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_ICON: https://avatars.slack-edge.com/2020-11-18/1496892993975_af721d1c045bea2d5a46_48.png
MSG_MINIMAL: true
SLACK_USERNAME: Samples update