name: Create release draft

on:
  push:
    tags:
      - "*.*.*"

jobs:
  draft-release:
    runs-on: ubuntu-latest
    if: (github.repository == 'crocs-muni/sec-certs') && (github.ref == 'refs/heads/main')
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Release
        uses: softprops/action-gh-release@v1
        with:
          draft: true
          generate_release_notes: true
