Skip to content
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

Use changesets #98

Merged
merged 3 commits into from
Dec 13, 2024
Merged
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
12 changes: 12 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.4/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "HiDeoo/starlight-blog" }
],
"commit": false,
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["starlight-blog-docs"]
}
1 change: 0 additions & 1 deletion .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
with:
cache: pnpm
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install
Expand Down
36 changes: 15 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@ name: release

on:
push:
tags:
- 'v*.*.*'
branches:
- main

jobs:
integration:
name: Integration
uses: ./.github/workflows/integration.yml

publish:
name: Publish
needs:
- integration
changeset:
name: Changeset
if: ${{ github.repository_owner == 'hideoo' }}
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -34,19 +30,17 @@ jobs:
with:
cache: pnpm
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install

- name: Publish
run: pnpm publish --no-git-checks
working-directory: packages/starlight-blog
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true

- name: Generate changelog
uses: hideoo/changelogithub-action@v1
- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: pnpm run version
publish: pnpm changeset publish
commit: 'ci: release'
title: 'ci: release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.astro
.changeset
.github/blocks
.next
.vercel
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
"scripts": {
"test": "pnpm --stream -r test",
"lint": "pnpm -r lint",
"format": "pnpm -r format"
"format": "pnpm -r format",
"version": "pnpm changeset version && pnpm i --no-frozen-lockfile"
},
"devDependencies": {
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.10",
"@hideoo/eslint-config": "3.0.0",
"@hideoo/prettier-config": "2.0.0",
"@hideoo/tsconfig": "2.0.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/starlight-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
},
"packageManager": "pnpm@8.6.9",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"sideEffects": false,
"keywords": [
Expand Down
Loading
Loading