Skip to content

Commit

Permalink
Add changeset configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
petervmeijgaard committed Apr 28, 2024
1 parent 270b9b8 commit 2ad5991
Show file tree
Hide file tree
Showing 5 changed files with 1,449 additions and 32 deletions.
9 changes: 9 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/cool-houses-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vivid-web/react-action": patch
---

Initial version
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release
on:
push:
branches:
- main
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
FORCE_COLOR: true
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Changelog PR or release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Prepare environment
uses: ./.github/actions/prepare

- name: Build Packages
run: pnpm run build

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# Note: pnpm install after versioning is necessary to refresh lockfile
version: pnpm run version
publish: pnpm exec changeset publish
commit: "ci: version packages"
title: "[Release] Version Packages"
env:
# Needs access to push to main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Needs access to publish to npm
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
"typecheck": "turbo typecheck",
"dev": "turbo dev",
"format": "prettier --check --cache .",
"postinstall": "manypkg check"
"postinstall": "manypkg check",
"version": "changeset version && pnpm install --no-frozen-lockfile && pnpm format --write"
},
"dependencies": {
"@changesets/cli": "^2.26.2",
"@manypkg/cli": "^0.21.4",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
Expand Down
Loading

0 comments on commit 2ad5991

Please sign in to comment.