name: Keep the versions up-to-date

on:
  release:
    types: [published, edited]

jobs:
  actions-tagger:
    runs-on: windows-latest

    permissions:
      # Give the default GITHUB_TOKEN write permission.
      # https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
      contents: write

    steps:
      - uses: Actions-R-Us/actions-tagger@latest
        env:
          GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
        with:
          publish_latest_tag: true