# ==================================================================================================================== #
# Authors:                                                                                                             #
#   Unai Martinez-Corral                                                                                               #
#                                                                                                                      #
# ==================================================================================================================== #
# Copyright 2020-2025 The pyTooling Authors                                                                            #
#                                                                                                                      #
# Licensed under the Apache License, Version 2.0 (the "License");                                                      #
# you may not use this file except in compliance with the License.                                                     #
# You may obtain a copy of the License at                                                                              #
#                                                                                                                      #
#   http://www.apache.org/licenses/LICENSE-2.0                                                                         #
#                                                                                                                      #
# Unless required by applicable law or agreed to in writing, software                                                  #
# distributed under the License is distributed on an "AS IS" BASIS,                                                    #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.                                             #
# See the License for the specific language governing permissions and                                                  #
# limitations under the License.                                                                                       #
#                                                                                                                      #
# SPDX-License-Identifier: Apache-2.0                                                                                  #
# ==================================================================================================================== #
name: 'Releaser'
description: 'Publish releases, upload assets and update tip/nightly tags'
inputs:
  token:
    description: 'Token to make authenticated API calls; can be passed in using {{ secrets.GITHUB_TOKEN }}'
    required: true
  files:
    description: 'Multi-line list of glob patterns describing the artifacts to be uploaded'
    required: true
  tag:
    description: 'Name of the tag that corresponds to the tip/nightly pre-release'
    required: false
    default: tip
  rm:
    description: 'Whether to delete all the previous artifacts, or only replacing the ones with the same name'
    required: false
    default: false
  snapshots:
    description: 'Whether to create releases from any tag or to treat some as snapshots'
    required: false
    default: true
runs:
  using: 'docker'
  image: 'docker://ghcr.io/pytooling/releaser'
