name: release

on:
  push:
    tags: [ v*.*.* ]

jobs:

  release:
    runs-on: ubuntu-latest
    steps:
      - id: get_version
        run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

      - uses: actions/checkout@v4

      - name: build
        uses: lwch/natpass@builder
        env:
          BUILD_VERSION: ${{ steps.get_version.outputs.VERSION }}

      - name: release
        uses: lwch/natpass@release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BUILD_VERSION: ${{ steps.get_version.outputs.VERSION }}