Skip to content

feat(cicd): release-please #7831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
26 changes: 26 additions & 0 deletions .github/workflows/lint-pr-title.yml
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be a required check

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Lint PR'

on:
pull_request_target:
types:
- opened
- edited
- reopened

permissions: {}

jobs:
validate-pr:
name: Validate PR title
runs-on: ubuntu-latest
permissions:
pull-requests: read
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- name: Validate PR title
uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
141 changes: 0 additions & 141 deletions .github/workflows/publish-packages.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Release and Publish

on:
push:
branches: [main]

concurrency:
group: release-${{ github.ref }}
Copy link
Preview

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using github.ref in the concurrency group may include the full ref path (e.g., refs/heads/main), leading to less-readable group names. Consider using github.ref_name to restrict it to the branch name.

Suggested change
group: release-${{ github.ref }}
group: release-${{ github.ref_name }}

Copilot uses AI. Check for mistakes.

cancel-in-progress: false

permissions: {}

jobs:
release:
name: Create Release
runs-on: ubuntu-latest
outputs:
paths_released: ${{ steps.create-release.outputs.paths_released }}
releases_created: ${{ steps.create-release.outputs.releases_created }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Create release with release-please
uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0
id: create-release
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
release-type: node

publish:
name: Publish Packages
if: needs.release.outputs.releases_created == 'true'
runs-on: ubuntu-latest
needs: release
permissions:
contents: read
id-token: write # For provenance
strategy:
fail-fast: false
matrix:
path: ${{ fromJson(needs.release.outputs.paths_released) }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0

- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Publish package with provenance
working-directory: ${{ matrix.path }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: pnpm publish --access=public --provenance
8 changes: 8 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/refs/heads/main/schemas/config.json",
"packages": {
"packages/rehype-shiki": {},
"packages/i18n": {},
"packages/ui-components": {}
}
}
Loading