Skip to content

Commit

Permalink
ci: add changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano committed Oct 31, 2024
1 parent a7f647d commit 2136495
Show file tree
Hide file tree
Showing 5 changed files with 567 additions and 36 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)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
41 changes: 29 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,44 @@
name: Release

permissions:
id-token: write
contents: write

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

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout Repo
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
version: 9.12.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- run: pnpm dlx changelogithub
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "trpc-nuxt",
"description": "End-to-end typesafe APIs in Nuxt applications.",
"type": "module",
"packageManager": "pnpm@9.1.1",
"packageManager": "pnpm@9.12.0",
"version": "0.11.0-beta.1",
"license": "MIT",
"sideEffects": false,
Expand Down Expand Up @@ -35,7 +35,7 @@
"build": "tsup",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"release": "bumpp && npm publish",
"release": "pnpm build && changeset publish",
"update-deps": "taze -w && pnpm i"
},
"peerDependencies": {
Expand All @@ -48,10 +48,10 @@
"ohash": "^1.1.3"
},
"devDependencies": {
"@changesets/cli": "^2.27.9",
"@nuxt/eslint-config": "^0.3.13",
"@trpc/client": "^11.0.0-rc.477",
"@trpc/server": "^11.0.0-rc.477",
"bumpp": "^9.4.2",
"eslint": "^9.7.0",
"taze": "^0.13.8",
"tsup": "8.0.2",
Expand Down
Loading

0 comments on commit 2136495

Please sign in to comment.