Skip to content

Changesets

Changesets #343

Workflow file for this run

name: Changesets
on:
push:
branches:
- main
paths:
- ".changeset/**"
- ".github/workflows/changesets.yaml"
workflow_dispatch:
env:
CI: true
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
HUSKY: 0
jobs:
Version:
if: github.repository == 'vnphanquang/svelte-put' # prevents this action from running on forks
permissions:
contents: write # to create release (changesets/action)
id-token: write # OpenID Connect token needed for provenance
pull-requests: write # to create pull request (changesets/action)
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --ignore-scripts --no-frozen-lockfile
- name: Create release PR or Publish to npm
uses: changesets/action@v1
with:
version: pnpm ci:version
publish: pnpm ci:publish
commit: "chore(release): changesets versioning & publication"
title: "Changesets: Versioning & Publication"
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}