Skip to content

Commit

Permalink
Merge pull request #805 from buildo/github-actions
Browse files Browse the repository at this point in the history
Use GitHub Actions
  • Loading branch information
gabro authored May 3, 2024
2 parents 72090d6 + 6504228 commit ae3a660
Show file tree
Hide file tree
Showing 15 changed files with 112 additions and 502 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
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release

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

permissions: write-all

jobs:
checks:
runs-on: ubuntu-latest
name: Checks
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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 }}
- name: Commit & Push changes
uses: actions-js/push@master
with:
message: ${{ github.ref_name }}
github_token: ${{ secrets.GITHUB_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

- 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

- uses: slackapi/slack-github-action@v1.24.0
if: ${{ job.status == 'success' }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
JOB_STATUS: ${{ job.status }}
ATTACHMENT_COLOR: "good"
with:
channel-id: bento
slack-message: ":tada: Version ${{ github.ref_name }} has been released!"

- uses: slackapi/slack-github-action@v1.24.0
if: ${{ job.status == 'failure' }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
JOB_STATUS: ${{ job.status }}
ATTACHMENT_COLOR: "danger"
with:
channel-id: bento
slack-message: ":x: Version ${{ github.ref_name }} failed to release"
216 changes: 0 additions & 216 deletions ci/pipeline.yml

This file was deleted.

26 changes: 0 additions & 26 deletions ci/tasks/build.yml

This file was deleted.

Loading

0 comments on commit ae3a660

Please sign in to comment.