name: Publish

on:
  push:
    tags:
    - '*'

jobs:
  publish:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Archive katas
      shell: bash
      run: git archive --output=git-katas.zip HEAD

    - name: Create GitHub release
      id: create_release
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        draft: false
        prerelease: false

    - name: Attach katas
      uses: actions/upload-release-asset@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        upload_url: ${{ steps.create_release.outputs.upload_url }}
        asset_path: ./git-katas.zip
        asset_name: git-katas-${{ github.ref }}.zip
        asset_content_type: application/zip

name: Publish

on:
  push:
    tags:
    - '*'

jobs:
  publish:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Get tag
      id: get_tag
      run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}

    - name: Archive katas
      shell: bash
      run: git archive --output=git-katas.zip HEAD

    - name: Create GitHub release
      id: create_release
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        draft: false
        prerelease: false

    - name: Attach katas
      uses: actions/upload-release-asset@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        upload_url: ${{ steps.create_release.outputs.upload_url }}
        asset_path: ./git-katas.zip
        asset_name: git-katas-${{ steps.get_tag.outputs.TAG }}.zip
        asset_content_type: application/zip

Fix tag in release asset name
Fix tag in release asset name
