name: release Windows

on:
  workflow_dispatch:
    inputs:
      release_tag:
        required: false
        type: string
  push:
    branches:
      - master

permissions:
  contents: write

jobs:
  build:
    uses: ./.github/workflows/build.yml
    with:
      target: windows
      project: ./v2rayN/v2rayN.csproj

  release-zip:
    if: inputs.release_tag != ''
    needs: build
    uses: ./.github/workflows/package-zip.yml
    with:
      target: windows
      release_tag: ${{ inputs.release_tag }}
