Skip to content

chore: changesets and pnpm #2

chore: changesets and pnpm

chore: changesets and pnpm #2

Workflow file for this run

name: Release
on:
push:
branches:
- main
- **-pre

Check failure on line 7 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 7
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
pull-requests: write
contents: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 9.1.0
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Create Release Pull Request or Publish to npm
if: github.ref == 'refs/heads/main'
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm build && pnpm changeset publish
commit: 'chore(release): '
title: 'chore(release): '
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }}
- name: Create unstable release
if: github.ref != 'refs/heads/main' || steps.changesets.outputs.published == 'false'
run: |
pnpm changeset version --snapshot alpha
pnpm changeset publish --tag alpha
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH }}