Skip to content

chore: publish changelog to NPM #7

chore: publish changelog to NPM

chore: publish changelog to NPM #7

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions: {}
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: startsWith(github.repository, 'StyleShit/')
permissions:
contents: write # to create release (changesets/action)
issues: write # to post issue comments (changesets/action)
pull-requests: write # to create pull request (changesets/action)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: 20.x
- run: npm ci
- name: Cache build
id: cache-build
uses: actions/cache@v4
env:
cache-name: cache-build
with:
path: ./dist
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Create release PR or publish
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
commit: 'chore(release): publish'
title: 'Release package'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}