Merge pull request #134 from adara-cs/changeset-release/main #164
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: Release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
pages: write | |
id-token: write | |
env: | |
CI: true | |
jobs: | |
pre-checks: | |
name: Run Tests and Linter | |
uses: ./.github/workflows/tests-and-lint.yml | |
release: | |
name: Release | |
needs: pre-checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PAT_GITHUB }} | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build | |
run: pnpm build | |
- name: Setup Git User | |
shell: bash | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Adara Cloud CI" | |
- name: Publish versions | |
uses: changesets/[email protected] | |
with: | |
commit: "chore: update versions" | |
title: "chore: update versions" | |
version: pnpm ci:version | |
publish: pnpm ci:publish | |
setupGitUser: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_ENV: "production" | |
- name: Build storybook | |
run: npm run build-storybook | |
- name: Upload storybook | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: storybook-static/ | |
- name: Deploy storybook to GitHub Pages | |
uses: actions/deploy-pages@v4 | |
with: | |
token: ${{ github.token }} |