Skip to content

fix(ci): revert prettier config to .cjs and add workflow permissions #14

fix(ci): revert prettier config to .cjs and add workflow permissions

fix(ci): revert prettier config to .cjs and add workflow permissions #14

name: Release ESLint Config Package
permissions: # Add top-level permissions for changeset action
contents: write
pull-requests: write
on:
push:
branches:
- main # Trigger on push to main branch
workflow_dispatch: # Allow manual trigger
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # Needed to create release commit/PR
pull-requests: write # Needed to create release PR
id-token: write # Needed for OIDC publishing
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# Fetch depth 0 is required for changeset version to correctly determine changed packages
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called 'release' in your package.json
# which runs 'changeset publish'. We defined 'release' as 'pnpm run build && changeset publish'.
publish: pnpm run release
# Optional: Use 'createGithubReleases: true' to create GitHub releases
# Optional: Use 'commit: "chore: update versions"' to commit directly instead of PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # Still needed for the publish command within 'release' script
# Use NPM_CONFIG_PROVENANCE=true for OIDC/provenance if not using JS-DevTools/npm-publish
# NPM_CONFIG_PROVENANCE: "true"