name: Publish tag
on:
  push:
    tags:
      - 'v*'
jobs:
  build:
    runs-on: ubuntu-latest
    env:
      TAG_NAME: ${{ github.ref_name }}
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK
        uses: actions/setup-java@v2
        with:
          java-version: '17'
          distribution: 'temurin'
      - name: Build with Gradle
        uses: gradle/gradle-build-action@v2
        with:
          arguments: build
      - name: Release
        uses: softprops/action-gh-release@v1
        with:
          files: build/libs/*
