Skip to content

Commit

Permalink
ci: replace changelogen with changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano committed Oct 31, 2024
1 parent 8ccfa86 commit 8beefd5
Show file tree
Hide file tree
Showing 3 changed files with 3,555 additions and 3,853 deletions.
35 changes: 28 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,42 @@ name: Release

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

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@v3
- 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
with:
version: 9.12.0

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

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

- 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.2.0",
"packageManager": "pnpm@9.11.0",
"version": "0.10.22",
"license": "MIT",
"sideEffects": false,
Expand Down Expand Up @@ -38,7 +38,7 @@
"build": "tsup",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"release": "changelogen --release && npm publish && git push --follow-tags",
"release": "pnpm build && changeset publish",
"update-deps": "taze -w && pnpm i"
},
"peerDependencies": {
Expand All @@ -51,10 +51,10 @@
"ohash": "^1.1.3"
},
"devDependencies": {
"@changesets/cli": "^2.27.9",
"@nuxt/eslint-config": "^0.3.13",
"@trpc/client": "^10.45.2",
"@trpc/server": "^10.45.2",
"changelogen": "^0.5.5",
"eslint": "^9.4.0",
"ofetch": "^1.3.4",
"taze": "^0.13.8",
Expand Down
Loading

0 comments on commit 8beefd5

Please sign in to comment.