Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 68 additions & 9 deletions .github/workflows/changeset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,79 @@ jobs:
published_packages: ${{ steps.changesets.outputs.publishedPackages }}
buildkite_webhook_url: ${{ secrets.ENCHIRIDION_BUILDKITE_WEBHOOK_URL }}

notify-slack:
notify-slack-success:
runs-on: ubuntu-latest
timeout-minutes: 5
needs:
version
# We only trigger this flow if the publish is happening, inferred by not having a changeset.
if: needs.version.outputs.hasChangesets == 'false'
env:
PUBLISHED: ${{ needs.version.outputs.hasPublished }}
needs: version
if: needs.version.outputs.hasPublished == 'true'
steps:
- name: Notify successful publish
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: 'C02NUQ27G56'
slack-message: 'Packages have been published'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

notify-slack-failure:
runs-on: ubuntu-latest
timeout-minutes: 5
needs: version
if: ${{ always() && needs.version.result == 'failure' }}
steps:
- name: Send
- uses: actions/checkout@v4

- name: Get failure context
id: context
run: |
SHA="${{ github.sha }}"
SHORT_SHA="${SHA:0:7}"
SUBJECT=$(git log -1 --format='%s' "$SHA")
echo "short_sha=$SHORT_SHA" >> "$GITHUB_OUTPUT"
echo "subject=$SUBJECT" >> "$GITHUB_OUTPUT"
echo "run_url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> "$GITHUB_OUTPUT"

- name: Notify publish failure
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: 'C02NUQ27G56'
slack-message: ${{ env.PUBLISHED == 'true' && 'Packages have been published' || 'Publishing failed' }}
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":x: *Publishing failed*"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Commit:* <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|`${{ steps.context.outputs.short_sha }}`> ${{ steps.context.outputs.subject }}"
Comment thread
ckychris marked this conversation as resolved.
},
{
"type": "mrkdwn",
"text": "*Pushed by:* ${{ github.actor }}"
}
]
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "View failed run"
},
"url": "${{ steps.context.outputs.run_url }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/check-package-output.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check package output

on:
pull_request:
branches:
- 'main'
- 'release/**'

jobs:
check-package-output:
# Skip on changeset release branches (automated version bumps)
if: github.head_ref != 'changeset-release/main'
Comment thread
ckychris marked this conversation as resolved.
Outdated
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: ./.github/actions/setup

- name: Build workspace
run: pnpm turbo build

- name: Check package output drift
run: npx tsx scripts/check-package-output.ts
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
!*.scss

# Explicitly ignore...
.devbox/
devbox.lock
pnpm-lock.yaml
**/CHANGELOG.md
Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import prettierRules from './.prettierrc.js'
export default tseslint.config(
{
ignores: [
'.devbox/**',
'**/CHANGELOG.md',
'**/tmp/**',
'**/*.d.ts',
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"reset": "pnpm clean && pnpm install --force",
"chromatic": "chromatic",
"changeset": "changeset",
"check:changeset": "changeset status --since=origin/main",
"check:package-output": "npx tsx scripts/check-package-output.ts",
"plop": "plop",
"pkg:aio": "pnpm -F @kaizen/components",
"pkg:tokens": "pnpm -F @kaizen/design-tokens",
Expand Down
Loading
Loading