Skip to content

Commit

Permalink
Merge pull request #2 from tinloof/ci
Browse files Browse the repository at this point in the history
Add changeset github action
  • Loading branch information
thomasKn authored Mar 19, 2024
2 parents f2489ae + ac2e8d7 commit 6bcbed2
Show file tree
Hide file tree
Showing 8 changed files with 11,798 additions and 23,136 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
branches:
- main

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

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup PNPM
uses: pnpm/action-setup@v3

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

- name: Install dependencies
run: pnpm install

- 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] release"
title: "[ci] release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion examples/hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@sanity/react-loader": "^1.8.5",
"@sanity/vision": "^3.29.1",
"@tailwindcss/typography": "0.5.10",
"@tinloof/sanity-studio": "*",
"@tinloof/sanity-studio": "workspace:*",
"classnames": "2.5.1",
"next": "14.1.0",
"next-sanity": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@sanity/react-loader": "^1.8.5",
"@sanity/vision": "^3.29.1",
"@tailwindcss/typography": "0.5.10",
"@tinloof/sanity-studio": "*",
"@tinloof/sanity-studio": "workspace:*",
"classnames": "2.5.1",
"next": "14.1.0",
"next-sanity": "^8.0.0",
Expand Down
Loading

0 comments on commit 6bcbed2

Please sign in to comment.