Skip to content

chore: release main (#8706) #3786

chore: release main (#8706)

chore: release main (#8706) #3786

Workflow file for this run

name: Build
concurrency:
group: deploy_next
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.ADMIN_TOKEN }}
ref: main
- uses: actions/setup-node@v3
with:
node-version-file: package.json
registry-url: "https://registry.npmjs.org"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: storybook/next deployment
env:
NEXT_RELEASE_ENABLED: ${{ secrets.NEXT_RELEASE_ENABLED }}
# https://github.com/storybookjs/storybook-deployer/issues/77#issuecomment-618560481
GH_TOKEN_FOR_STORYBOOK: ${{ github.actor }}:${{ secrets.ADMIN_TOKEN }}
run: |
if [ "$NEXT_RELEASE_ENABLED" == "true" ]; then
npm install
if npm run util:is-next-deployable; then
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
# version the packages with lerna before building to ensure
# the version in the CC source code preamble is correct for deployment
npm run version:next
npm run build
npm test
# deploy storybook, but still release next if it fails
{ npm run --workspace=@esri/calcite-components build-storybook &&
npx --workspace=@esri/calcite-components storybook-to-ghpages \
--host-token-env-variable=GH_TOKEN_FOR_STORYBOOK \
--existing-output-dir=docs --ci; } || true
# remove the built docs after storybook deploys to gh-pages
git reset --hard
npm run publish:next
npm run util:push-tags
fi
else
echo "Next release is disabled"
fi
- name: notify teams
uses: toko-bifrost/ms-teams-deploy-card@3.1.2
if: always()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
webhook-uri: ${{ secrets.TEAMS_WEBHOOK_URI_BUILD }}
show-on-start: false
card-layout-exit: complete
timezone: America/Los_Angeles