fix: improve storage null checks and error handling across services (… #24
Workflow file for this run
This file contains hidden or 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: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright browsers | |
| run: npx playwright install chromium | |
| - name: Build packages | |
| run: npm run build | |
| - name: Run lint | |
| run: npm run lint | |
| - name: Run tests | |
| run: npm test | |
| release: | |
| needs: test | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Set version from tag in all packages | |
| run: | | |
| TAG_VERSION="${GITHUB_REF#refs/tags/v}" | |
| for pkg in packages/*; do | |
| if [ -f "$pkg/package.json" ]; then | |
| npm version --no-git-tag-version --workspace="$pkg" "$TAG_VERSION" | |
| fi | |
| done | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build packages | |
| run: npm run build | |
| - name: Publish all packages | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: | | |
| for pkg in packages/*; do | |
| if [ -f "$pkg/package.json" ]; then | |
| cd "$pkg" | |
| npm publish --access public --provenance | |
| cd - | |
| fi | |
| done | |
| - name: Commit and push version bump | |
| run: | | |
| TAG_VERSION="${GITHUB_REF#refs/tags/v}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add packages/*/package.json | |
| git commit -m "chore: set version to $TAG_VERSION" | |
| git tag -f "v$TAG_VERSION" | |
| git push origin HEAD:refs/heads/main --follow-tags | |
| git push origin -f "v$TAG_VERSION" | |
| storybook: | |
| needs: release | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build packages | |
| run: npm run build | |
| - name: Build Storybook | |
| run: npm run build-storybook -w packages/ui | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: packages/ui/storybook-static | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |