grafana/.github/workflows/github-release.yml
Kevin Minehart 63e715f6a9
CI: Sync branch and tag after release (#89967)
* Added `workflow_call` event to allow other workflows to invoke the "Create or update GitHub release"
* Added `dry_run` to `github-release.yml`
* Added `latest` to `release-pr.yml` which will cause the release PR to add a `release/latest` label.
* Removed unnecessary github app creation from github-release workflow and just used permissions.
2024-07-08 14:32:28 -05:00

49 lines
1.3 KiB
YAML

name: Create or update GitHub release
on:
workflow_call:
inputs:
version:
required: true
description: Needs to match, exactly, the name of a milestone (NO v prefix)
type: string
latest:
required: false
default: false
description: Mark this release as latest (`1`) or not (`0`, default)
type: string
dry_run:
required: false
default: false
type: boolean
workflow_dispatch:
inputs:
version:
required: true
description: Needs to match, exactly, the name of a milestone (NO v prefix)
type: string
latest:
required: false
description: Mark this release as latest (`1`) or not (`0`, default)
type: string
dry_run:
required: false
default: false
type: boolean
permissions:
# contents: write allows the action(s) to create github releases
contents: write
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Create GitHub release (manually invoked)
uses: grafana/grafana-github-actions-go/github-release@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ inputs.version }}
metrics_api_key: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
latest: ${{ inputs.latest }}
dry_run: ${{ inputs.dry_run }}