alvis/presetter

View on GitHub
.github/workflows/release.yaml

Summary

Maintainability
Test Coverage
name: release

on:
  push:
    tags:
      - v*

jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      id-token: write
    steps:
      - name: enable corepack
        run: corepack enable
      - name: checkout
        uses: actions/checkout@v4
      - name: use node LTS
        uses: actions/setup-node@v4
        with:
          node-version: lts/*
          cache: pnpm
      - name: install dependencies
        run: pnpm install
      - name: publish the release note
        run: npx github-release-from-changelog
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      - name: login to npm
        run: npm config set //registry.npmjs.org/:_authToken $NPM_AUTH_TOKEN
        env:
          NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
      - name: publish the package
        run: pnpm --recursive publish --no-git-checks
        env:
          NPM_CONFIG_PROVENANCE: true