Skip to content

Merge branch 'main' of https://github.com/Pilaton/sleep-sleep #7

Merge branch 'main' of https://github.com/Pilaton/sleep-sleep

Merge branch 'main' of https://github.com/Pilaton/sleep-sleep #7

Workflow file for this run

name: Release and publish to npm
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
changelog-types: '[{"type":"feat","section":"🎉 Features","hidden":false},{"type":"fix","section":"🛠️ Bug Fixes","hidden":false},{"type":"docs","section":"📝 Docs","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false}]'
# The logic below handles the npm publication:
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
if: ${{ steps.release.outputs.release_created }}
- name: Install dependencies
run: pnpm install
if: ${{ steps.release.outputs.release_created }}
- name: Build package
run: pnpm run build
if: ${{ steps.release.outputs.release_created }}
- name: Publish to npm
run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}