Skip to content

Merge pull request #20 from hakierka/amy-edit #63

Merge pull request #20 from hakierka/amy-edit

Merge pull request #20 from hakierka/amy-edit #63

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
- run: pnpm install
- run: pnpm lint
test:
name: Test
needs: check
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node: [18, 20]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- run: pnpm install
- run: pnpm test
changelog:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Changelog
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
releases_created: ${{ steps.tag-release.outputs.releases_created }}
steps:
- uses: googleapis/release-please-action@v4
id: tag-release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
needs:
- check
- test
- changelog
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- run: pnpm install
- run: pnpm -r publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}