Skip to content

Commit

Permalink
Merge branch 'main' into DS-350
Browse files Browse the repository at this point in the history
  • Loading branch information
veej authored Nov 28, 2024
2 parents 9f8aa30 + 52d00bb commit fb80fd4
Show file tree
Hide file tree
Showing 89 changed files with 9,791 additions and 7,332 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/add-issues-to-project.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,56 @@
on: [push]
name: CI

name: Publish Website and Playroom
on: [push]

jobs:
publish:
checks:
runs-on: ubuntu-latest
name: Checks
strategy:
fail-fast: false
matrix:
tasks: [prettier-check, eslint-check, check-circular-deps, test, typecheck, build]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
run_install: true
- run: pnpm ${{ matrix.tasks }}

chromatic:
runs-on: ubuntu-latest
name: Chromatic
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
run_install: true
- uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: packages/bento-design-system
autoAcceptChanges: main
exitOnceUploaded: true

cloudflare-pages:
runs-on: ubuntu-latest
name: Cloudflare Pages
permissions:
contents: read
deployments: write
name: Cloudflare Pages
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
- uses: pnpm/action-setup@v2
with:
run_install: true
Expand Down
85 changes: 85 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Release

on:
push:
tags: ["v*"]

permissions: write-all

jobs:
release:
runs-on: ubuntu-latest
name: Release
steps:
- name: Generate Github App Token
id: github_app_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_APP_PRIVATE_KEY }}

- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
token: ${{ steps.github_app_token.outputs.token }}

- uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v3
with:
run_install: true

- run: |
cd packages/bento-design-system
pnpm version --no-git-tag-version --new-version ${{ github.ref_name }}
new_version=$(cat package.json | jq -r '.version')
cd ../../templates/react-router-monorepo/libs/design-system
jq '.dependencies["@buildo/bento-design-system"] = "'${new_version}'"' package.json > package.json.tmp && mv package.json.tmp package.json
- name: Commit & Push changes
uses: actions-js/push@master
with:
message: ${{ github.ref_name }}
author_name: buildo-release-bot[bot]
author_email: 168835274+buildo-release-bot[bot]@users.noreply.github.com
github_token: ${{ steps.github_app_token.outputs.token }}

- name: Publish to npm
uses: JS-DevTools/npm-publish@v3
with:
package: "packages/bento-design-system/package.json"
token: ${{ secrets.NPM_TOKEN }}
access: "public"
provenance: true
ignore-scripts: false

- name: Publish to Github
uses: JS-DevTools/npm-publish@v3
with:
package: "packages/bento-design-system/package.json"
registry: "https://npm.pkg.github.com"
token: ${{ secrets.GITHUB_TOKEN }}
access: "public"
provenance: true
ignore-scripts: false

- uses: slackapi/[email protected]
if: ${{ job.status == 'success' }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
channel-id: C02UMTSG2BA
payload: '{"text": ":tada: Version ${{ github.ref_name }} has been released!"}'

- uses: slackapi/[email protected]
if: ${{ job.status == 'failure' }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
channel-id: C02UMTSG2BA
payload: '{"text": ":x: Version ${{ github.ref_name }} failed to release"}'
216 changes: 0 additions & 216 deletions ci/pipeline.yml

This file was deleted.

Loading

0 comments on commit fb80fd4

Please sign in to comment.