name: Publish Action

on:
  release:
    types: [published, edited]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          ref: ${{ github.event.release.tag_name }}
      - uses: actions/setup-node@v4
        with:
          node-version: 24
          registry-url: https://registry.npmjs.org/
      - run: npm ci
      - run: npm run build:action
      - uses: JasonEtco/build-and-tag-action@v2
        env:
          GITHUB_TOKEN: ${{ github.token }}
