Skip to content

chore(changeset): release packages #514

chore(changeset): release packages

chore(changeset): release packages #514

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: release-${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
if: github.repository_owner == 'isaac-mason'
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max-old-space-size=4096'
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Node.js 22.x
uses: actions/setup-node@v2
with:
node-version: 22.x
- name: Install Dependencies
run: yarn
- name: Build Packages
run: ./ci/build-packages.sh
shell: bash
- name: Test
run: yarn test
# navmesh website
- name: NavMesh Website - Pull Vercel Environment Information
run: yarn run vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_NAVMESH_WEBSITE_PROJECT_ID }}
- name: NavMesh Website - Build Project Artifacts
run: yarn run vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VITE_GTAG_ID: ${{ secrets.PROD_VITE_GTAG_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_NAVMESH_WEBSITE_PROJECT_ID }}
- name: NavMesh Website - Deploy Project Artifacts to Vercel
run: yarn run vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_NAVMESH_WEBSITE_PROJECT_ID }}
# storybook
- name: Storybook - Pull Vercel Environment Information
run: yarn run vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_STORYBOOK_PROJECT_ID }}
- name: Storybook - Build Project Artifacts
run: yarn run vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_STORYBOOK_PROJECT_ID }}
- name: Storybook - Deploy Project Artifacts to Vercel
run: yarn run vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_STORYBOOK_PROJECT_ID }}
# docs
- name: Docs - Pull Vercel Environment Information
run: yarn run vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_DOCS_PROJECT_ID }}
- name: Docs - Build Project Artifacts
run: yarn run vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_DOCS_PROJECT_ID }}
- name: Docs - Deploy Project Artifacts to Vercel
run: yarn run vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_DOCS_PROJECT_ID }}
# release
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: yarn run version
publish: yarn run publish
commit: 'chore(changeset): release packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}