name:  CD

on: 
  workflow_dispatch:
    inputs:
      tags:
        description: 'Release Tag'     
        required: true

env:
  APP_NAME: OnlineResourceWatcherApp

jobs:
  build: 
    runs-on: windows-latest
    permissions:
      contents: write
    steps:
    - uses: actions/checkout@v2
    - uses: ncipollo/release-action@v1
      with:
        artifacts: ""
        tag: ${{ github.event.inputs.tags }}
        token: ${{ secrets.GITHUB_TOKEN }}
        artifactErrorsFailBuild: true
    - uses: dev-drprasad/delete-older-releases@v0.2.0
      with:
        keep_latest: 3
        delete_tags: true
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    
