Skip to content

fix(deps): update dependency @antfu/ni to v28 (#1070) #910

fix(deps): update dependency @antfu/ni to v28 (#1070)

fix(deps): update dependency @antfu/ni to v28 (#1070) #910

name: Release
on:
push:
branches:
- main
- dev
paths:
- "packages/**"
- "docs/**"
- ".changeset/**"
- ".github/workflows/release-packages.yml"
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
release:
name: Release Seed Design Packages
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
packages: read
id-token: write
steps:
- name: Checkout Repo
uses: actions/checkout@v6
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- uses: actions/setup-node@v6 # this is faster than `bun install -g npm@latest`
with:
node-version: "24"
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.3"
- name: Install Dependencies
run: bun install --frozen-lockfile
- name: 릴리즈 Pull Request를 만들거나 패키지를 배포해요
id: changesets
uses: changesets/action@v1
with:
publish: bun release
version: bun version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }}
- name: 릴리즈 PR이 만들어지거나 업데이트된 경우 해당 PR의 base 브랜치를 체크아웃해요
if: steps.changesets.outputs.published == 'false' && steps.changesets.outputs.hasChangesets == 'true'
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
with:
ref: changeset-release/${{ github.ref_name }}
- name: 배포 전인 경우 rootage json 파일의 버전을 @seed-design/rootage-artifacts 버전에 맞춰요
if: steps.changesets.outputs.published == 'false' && steps.changesets.outputs.hasChangesets == 'true'
run: |
bun install --frozen-lockfile
bun rootage:build
bun install # link
bun rootage:generate
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add docs/public/rootage
git commit -m "Update public rootage version" || echo "No changes to commit"
git push
- name: 배포된 버전을 가져와요
id: get-package-versions
if: steps.changesets.outputs.published == 'true'
run: |
PACKAGE_VERSIONS=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -c 'map({name: .name, value: .version}) | from_entries')
echo "packageVersions=$PACKAGE_VERSIONS" >> $GITHUB_OUTPUT
- name: rootage-artifacts가 배포된 경우 Slack에 알려요
if: steps.changesets.outputs.published == 'true' && contains(fromJson(steps.changesets.outputs.publishedPackages || '[]').*.name, '@seed-design/rootage-artifacts')
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: "새 Rootage 버전이 배포되었어요."
blocks:
- type: "header"
text:
type: "plain_text"
text: "새 Rootage 버전이 배포되었어요: v${{ fromJson(steps.get-package-versions.outputs.packageVersions || '{}')['@seed-design/rootage-artifacts'] }}"
- type: "section"
text:
type: "plain_text"
text: "문서 빌드까지는 시간이 조금 더 걸릴 수 있어요."
- type: "actions"
elements:
- type: "button"
style: "primary"
text:
type: "plain_text"
text: "Changelog"
url: "https://seed-design.io/react/updates/changelog"