-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
This file was deleted.
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 }} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Using
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
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 |
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": {} | ||
} | ||
} |
There was a problem hiding this comment.
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