Skip to content

Commit

Permalink
chore: use changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo committed Dec 13, 2024
1 parent 202dd7d commit ee2743f
Show file tree
Hide file tree
Showing 8 changed files with 554 additions and 25 deletions.
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-versions" }
],
"commit": false,
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["starlight-versions-docs", "starlight-versions-example"]
}
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 @@ -32,19 +28,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-versions
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.1",
"@hideoo/prettier-config": "^2.0.0",
"@hideoo/tsconfig": "^2.0.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/starlight-versions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
},
"packageManager": "pnpm@9.0.4",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"sideEffects": false,
"keywords": [
Expand Down
Loading

0 comments on commit ee2743f

Please sign in to comment.